sched: Add TASK_WAKING
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Tue, 15 Sep 2009 12:43:03 +0000 (14:43 +0200)
committerIngo Molnar <mingo@elte.hu>
Tue, 15 Sep 2009 14:01:05 +0000 (16:01 +0200)
commite9c8431185d6c406887190519f6dbdd112641686
tree3c502201451df7bbfcd653fee940fcb40bdaaeb6
parent5f3edc1b1ead6d9bd45a85c551f44eff8fe76b9f
sched: Add TASK_WAKING

We're going to want to drop rq->lock in try_to_wake_up() for a
longer period of time, however we also want to deal with concurrent
waking of the same task, which is currently handled by holding
rq->lock.

So introduce a new TASK state, namely TASK_WAKING, which indicates
someone is already waking the task (other wakers will fail p->state
& state).

We also keep preemption disabled over the whole ttwu().

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/sched.h
kernel/sched.c