Re: robust futex heap support patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Nov 26, 2005, at 5:31 AM, Ingo Molnar wrote:


* david singleton <[email protected]> wrote:

There is a new patch, patch-2.6.14-rt15-rf1, that adds support for
robust and priority inheriting pthread_mutexes on the 'heap'.

we need to go a bit slower. For now i had to remove robust-futexes from
the -rt17 release because they broke normal (non-robust) futex support
in -rt15. A simple mozilla startup would hang... Please send fixes
against -rt16 and i'll try to re-add the robust futexes patch later on.
You can find -rt16 at:

whoops, sorry.

Here's he piece that broke regular futexes.  Futex wake doesn't
need to check to see if the robust list is null or not.

Index: linux-2.6.14/kernel/futex.c
===================================================================
--- linux-2.6.14.orig/kernel/futex.c
+++ linux-2.6.14/kernel/futex.c
@@ -323,10 +323,6 @@ static int futex_wake(unsigned long uadd
        ret = get_futex_key(uaddr, &key, &head, &sem);
        if (unlikely(ret != 0))
                goto out;
-       if (head == NULL) {
-               ret = -EINVAL;
-               goto out;
-       }

        bh = hash_futex(&key);
        spin_lock(&bh->lock);


Let me get the build fixed and add a new test for myself. I'll start running
this on my desktop to do builds, run mozilla and firefox, and generally
do all my normal work.

David

http://people.redhat.com/mingo/realtime-preempt/older/patch-2.6.14- rt16

The previous patches only supported either file based pthread_mutexes
or mmapped anonymous memory based pthread_mutexes.  This patch allows
pthread_mutexes to be 'malloc'ed while using the
PTHREAD_MUTEX_ROBUST_NP attribute or PTHREAD_PRIO_INHERIT attribute.

The patch can be found at:

http://source.mvista.com/~dsingleton

this patch looks much cleaner than the earlier one, but there's one more step to go: now that we've got the futex_head in every vma, why not hang
all robust futexes to the vma, and thus get rid of ->robust_list and
->robust_sem from struct address_space?

	Ingo

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux