public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [TIP][RFC 0/7] requeue pi implemenation
@ 2009-03-03  0:02 Darren Hart
  2009-03-03  0:09 ` [TIP][RFC 1/7] futex: futex_wait_queue_me() Darren Hart
                   ` (6 more replies)
  0 siblings, 7 replies; 27+ messages in thread
From: Darren Hart @ 2009-03-03  0:02 UTC (permalink / raw)
  To: lkml, ; +Cc: Thomas Gleixner, Steven Rostedt, Sripathi Kodi, John Stultz

The following series is v5 of the requeue_pi patches against
linux-2.6-tip/core/futexes.  The current futex implementation doesn't
allow for requeueing of PI futexes, which leads to a thundering herd
during pthread_cond_broadcast (as opposed to a civilized priority
ordered wakeup sequence).  The core of the problem is that the
underlying rt_mutex can not be left with waiters and no owner (which
would break the PI logic).  This patch series updates the futex requeue
code to allow for requeueing from non-pi to pi futexes in support of PI
aware pthread_cond_* calls along with some needful rt_mutex helper
routines.  The credit for the design goes to Thomas Gleixner, while the
bugs and other idiocies present in this implementation should be
attributed to me.

I'd really appreciate feedback on the implementation as well as any
design critiques.  Answers to the questions posed in the patch headers
and patches are particularly welcome.

This patch series has a known race condition that I'm currently
debugging (see 5/7), as well as notes, questions and FIXMEs in the
comments. These will be resolved and removed prior to submission

Each patch contains some documentation, but the bulk of the general
approach is outlined in 6/7.

Darren Hart (6):
    RFC: futex: add requeue_pi calls
    RFC: rt_mutex: add proxy lock routines
    RFC: futex: finish_futex_lock_pi()
    RFC: futex: futex_lock_pi_atomic()
    RFC: futex: futex_top_waiter()
    RFC: futex: futex_wait_queue_me()

$ git diff HEAD~6 | diffstat
include/asm-generic/errno.h |    2 
include/linux/futex.h       |    8 
include/linux/thread_info.h |    4 
kernel/futex.c              | 1205 +++++++++++++++++++++++++++++++++-----------
kernel/rtmutex.c            |  192 +++++--
kernel/rtmutex_common.h     |    8 
6 files changed, 1104 insertions(+), 315 deletions(-)

-- 
Darren Hart
IBM Linux Technology Center
Real-Time Linux Team



^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2009-03-10 13:40 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-03  0:02 [TIP][RFC 0/7] requeue pi implemenation Darren Hart
2009-03-03  0:09 ` [TIP][RFC 1/7] futex: futex_wait_queue_me() Darren Hart
2009-03-03  0:11 ` [TIP][RFC 2/7] futex: futex_top_waiter() Darren Hart
2009-03-07 15:16   ` Thomas Gleixner
2009-03-09 18:04     ` Darren Hart
2009-03-03  0:13 ` [TIP][RFC 3/7] futex: futex_lock_pi_atomic() Darren Hart
2009-03-03 13:03   ` Peter Zijlstra
2009-03-03 17:29     ` Darren Hart
2009-03-03  0:14 ` [TIP][RFC 4/7] futex: finish_futex_lock_pi() Darren Hart
2009-03-07 15:30   ` Thomas Gleixner
2009-03-09 18:05     ` Darren Hart
2009-03-03  0:16 ` [TIP][RFC 5/7] rt_mutex: add proxy lock routines Darren Hart
2009-03-07 15:44   ` Thomas Gleixner
2009-03-09 18:31     ` Darren Hart
2009-03-03  0:20 ` [TIP][RFC 6/7] futex: add requeue_pi calls Darren Hart
2009-03-04  7:53   ` Darren Hart
2009-03-05 16:51     ` Darren Hart
2009-03-06  1:42       ` Darren Hart
2009-03-06  2:21         ` Steven Rostedt
2009-03-06  5:27           ` Darren Hart
2009-03-07 15:50             ` Thomas Gleixner
2009-03-09 19:55               ` Darren Hart
2009-03-07  6:03         ` Sripathi Kodi
2009-03-09  9:48   ` Thomas Gleixner
2009-03-10  4:50     ` Darren Hart
2009-03-10 13:39       ` Thomas Gleixner
2009-03-03  0:23 ` [TIP][RFC 7/7] requeue pi testcase Darren Hart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox