futex: priority wakeup miss ordering
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..
Daniel
Quoted 8 lines · On Wed, 07 May 2008 14:22:58 -0700 Daniel Walker <[email protected]> wrote:
from commit
ec92d08292d3e9b0823eba138a4564d2d39f25c7The 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.
Quoted 9 lines
If you use a priority inheriting mutex this is correct. It's because the rtmutex hooks into
sched_setschedulerto 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..
Pierre is no longer @bull.net.
Quoted 7 lines · Daniel Walker
from commit
ec92d08292d3e9b0823eba138a4564d2d39f25c7The 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.
Quoted 8 lines
If you use a priority inheriting mutex this is correct. It's because the rtmutex hooks into
sched_setschedulerto 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
Quoted 4 lines · Thomas Gleixner
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.
I've gotten a number of complains about this .. I think it's assumed that this feature was implementing posix priority queuing for the standard futex, but it can't be if there are any miss ordered wakeups.
Daniel