All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: "Sébastien Dugué" <sebastien.dugue@bull.net>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [RFC][PATCH RT 0/2] futex priority based wakeup
Date: Wed, 10 May 2006 12:08:58 +0200	[thread overview]
Message-ID: <20060510100858.GA31504@elte.hu> (raw)
In-Reply-To: <20060510112651.24a36e7b@frecb000686>


* Sébastien Dugué <sebastien.dugue@bull.net> wrote:

>   in the current futex implementation, tasks are woken up in FIFO 
> order, (i.e. in the order they were put to sleep). For realtime 
> systems needing system wide strict realtime priority scheduling, tasks 
> should be woken up in priority order.
> 
>   This patchset achieves this by changing the futex hash bucket list 
> into a plist. Tasks waiting on a futex are enqueued in this plist 
> based on their priority so that they can be woken up in priority 
> order.

hm, i dont think this is enough. Basically, waking up in priority order 
is just the (easier) half of the story - what you want is to also 
propagate priorities when you block. We provided a complete solution via 
the PI-futex patchset (currently included in -mm).

In other words: as long as locking primitives go, i dont think real-time 
applications should use wakeup-priority-ordered futexes, they should use 
the real thing, PI futexes.

There is one exception: when a normal futex is used as a waitqueue 
without any contention properties. (for example a waitqueue for worker 
threads) But those are both rare, and typically dont muster tasks with 
different priorities - i.e. FIFO is good enough.

Also, there's a performance cost to this. Could you try to measure the 
impact to SCHED_OTHER tasks via some pthread locking benchmark?

	Ingo

  reply	other threads:[~2006-05-10 10:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-10  9:26 [RFC][PATCH RT 0/2] futex priority based wakeup Sébastien Dugué
2006-05-10 10:08 ` Ingo Molnar [this message]
2006-05-10 13:03   ` Sébastien Dugué
2006-05-10 14:32     ` Thomas Gleixner
2006-05-10 15:01       ` Jakub Jelinek
2006-05-10 17:02         ` Thomas Gleixner
2006-05-11  8:56           ` Sébastien Dugué
2006-05-16 10:36             ` Jakub Jelinek
2006-05-18  8:51               ` Sébastien Dugué
2006-05-12 13:32   ` Pierre Peiffer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060510100858.GA31504@elte.hu \
    --to=mingo@elte.hu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sebastien.dugue@bull.net \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.