mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Daniel Walker <dwalker@mvista.com>
Cc: Pierre Peiffer <peifferp@gmail.com>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: futex: priority wakeup miss ordering
Date: Thu, 8 May 2008 12:06:18 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.1.10.0805081156450.3318@apollo.tec.linutronix.de> (raw)
In-Reply-To: <1210195378.17132.237.camel@localhost.localdomain>

On Wed, 7 May 2008, Daniel Walker wrote:
> 
> from commit ec92d08292d3e9b0823eba138a4564d2d39f25c7
> 
> The wakeup ordering should be in priority order. However if the priority
> of a task is modified while it's waiting on the futex you will get an
> out of order wakeup.
> 
> If you use a priority inheriting mutex this is correct. It's because the
> rtmutex hooks into sched_setscheduler to catch any priority changes,
> then re-queues with the new priority.. But the futex doesn't have this
> hook.
> 
> Was this intentionally left out of this priority wake up patch? I
> thought I would let you know in case you had a specific reason for not
> handling this.. 

IIRC this has been discussed before. The priority ordering of the
plain mutex waiters is an optimization without guarantees of
correctness across a priority change. It's simply not worth the
additional complexity and overhead for that corner case.

Thanks,

	tglx

  parent reply	other threads:[~2008-05-08 10:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-07 21:22 Daniel Walker
2008-05-08  8:25 ` Andrew Morton
2008-05-08 10:06 ` Thomas Gleixner [this message]
2008-05-08 16:28   ` Daniel Walker

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=alpine.LFD.1.10.0805081156450.3318@apollo.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=dwalker@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peifferp@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®