diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2011-04-05 11:23:44 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-04-14 02:52:35 -0400 |
commit | fd2f4419b4cbe8fe90796df9617c355762afd6a4 (patch) | |
tree | 9eefa7f46c7163f00adb416ff4b9db97653d2665 /include/linux/sched.h | |
parent | d7c01d27ab767a30d672d1fd657aa8336ebdcbca (diff) |
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
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 173850479e2c..b33a700652dc 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1202,6 +1202,7 @@ struct task_struct { | |||
1202 | #ifdef CONFIG_SMP | 1202 | #ifdef CONFIG_SMP |
1203 | int on_cpu; | 1203 | int on_cpu; |
1204 | #endif | 1204 | #endif |
1205 | int on_rq; | ||
1205 | 1206 | ||
1206 | int prio, static_prio, normal_prio; | 1207 | int prio, static_prio, normal_prio; |
1207 | unsigned int rt_priority; | 1208 | unsigned int rt_priority; |