sched: Provide p->on_rq
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Tue, 5 Apr 2011 15:23:44 +0000 (17:23 +0200)
committerIngo Molnar <mingo@elte.hu>
Thu, 14 Apr 2011 06:52:35 +0000 (08:52 +0200)
commitfd2f4419b4cbe8fe90796df9617c355762afd6a4
tree9eefa7f46c7163f00adb416ff4b9db97653d2665
parentd7c01d27ab767a30d672d1fd657aa8336ebdcbca
sched: Provide p->on_rq

Provide a generic p->on_rq because the p->se.on_rq semantics are
unfavourable for lockless wakeups but needed for sched_fair.

In particular, p->on_rq is only cleared when we actually dequeue the
task in schedule() and not on any random dequeue as done by things
like __migrate_task() and __sched_setscheduler().

This also allows us to remove p->se usage from !sched_fair code.

Reviewed-by: Frank Rowand <frank.rowand@am.sony.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Nick Piggin <npiggin@kernel.dk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20110405152728.949545047@chello.nl
include/linux/sched.h
kernel/sched.c
kernel/sched_debug.c
kernel/sched_rt.c
kernel/sched_stoptask.c