[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1168445501.22579.7.camel@imap.mvista.com>
Date: Wed, 10 Jan 2007 08:11:41 -0800
From: Daniel Walker <dwalker@...sta.com>
To: Pierre Peiffer <pierre.peiffer@...l.net>
Cc: LKML <linux-kernel@...r.kernel.org>,
Dinakar Guniguntala <dino@...ibm.com>,
Jean-Pierre Dion <jean-pierre.dion@...l.net>,
Ingo Molnar <mingo@...e.hu>,
Ulrich Drepper <drepper@...hat.com>,
Jakub Jelinek <jakub@...hat.com>,
Darren Hart <dvhltc@...ibm.com>,
Sébastien Dugué <sebastien.dugue@...l.net>
Subject: Re: [PATCH 2.6.20-rc4 1/4] futex priority based wakeup
On Tue, 2007-01-09 at 17:16 +0100, Pierre Peiffer wrote:
> @@ -1358,7 +1366,7 @@ static int futex_unlock_pi(u32 __user *u
> struct futex_hash_bucket *hb;
> struct futex_q *this, *next;
> u32 uval;
> - struct list_head *head;
> + struct plist_head *head;
> union futex_key key;
> int ret, attempt = 0;
>
> @@ -1409,7 +1417,7 @@ retry_locked:
> */
> head = &hb->chain;
>
> - list_for_each_entry_safe(this, next, head, list) {
> + plist_for_each_entry_safe(this, next, head, list) {
> if (!match_futex (&this->key, &key))
> continue;
> ret = wake_futex_pi(uaddr, uval, this);
Is this really necessary? The rtmutex will priority sort the waiters
when you enable priority inheritance. Inside the wake_futex_pi() it
actually just pulls the new owner off another plist inside the the
rtmutex structure.
Daniel
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists