2006-02-03 03:19:01

by David Singleton

[permalink] [raw]
Subject: Re: Robust mutexes (-rt)

Thomas,
here is a patch that fixes the -EINTR problem and a fix for Dinakar's
simple futex deadlock test program. When Esben's new deadlock detection
is ready I plan to use it for robust futex deadlock detection, both simple and
circular deadlock detection.


http://source.mvista.com:~dsingleton/patch-2.6.15-rt16-rf1

include/linux/futex.h | 3 +++
kernel/futex.c | 3 +++
kernel/rt.c | 19 ++++++++++++++++++-
3 files changed, 24 insertions(+), 1 deletion(-)

David

> Just another problem:
>
> pthread_mutex_lock() of a robust mutex returns -EINTR, which is wrong by
> the specification. We encountered this in an application. Not sure what
> to do about that. It needs either a fix in glibc or the kernel could
> handle it via a restart function. That happens when a signal is
> delivered to the thread while the thread is blocked on the mutex.
>
> tglx
>
>
>
>
>


2006-02-03 06:04:23

by Thomas Gleixner

[permalink] [raw]
Subject: Re: Robust mutexes (-rt)

On Thu, 2006-02-02 at 19:18 -0800, David Singleton wrote:
> Thomas,
> here is a patch that fixes the -EINTR problem and a fix for Dinakar's
> simple futex deadlock test program. When Esben's new deadlock detection
> is ready I plan to use it for robust futex deadlock detection, both simple and
> circular deadlock detection.
>
>
> http://source.mvista.com:~dsingleton/patch-2.6.15-rt16-rf1
>
> include/linux/futex.h | 3 +++
> kernel/futex.c | 3 +++
> kernel/rt.c | 19 ++++++++++++++++++-
> 3 files changed, 24 insertions(+), 1 deletion(-)

The stats are nice. I'd prefer a patch associated with them :)

tglx