diff options
author | Ingo Molnar <mingo@elte.hu> | 2007-10-15 11:00:01 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2007-10-15 11:00:01 -0400 |
commit | 44142fac3446d08c08c5d717ec11d50a737e8640 (patch) | |
tree | 2d1a97a5512e869416b90b32f4e79b11cdd6acf6 | |
parent | 23fd50450a34f2558070ceabb0bfebc1c9604af5 (diff) |
sched: fix sysctl_sched_child_runs_first flag
fix the sched_child_runs_first flag: always call into ->task_new()
if we are on the same CPU, as SCHED_OTHER tasks depend on it for
correct initial setup.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | kernel/sched.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 6c10fa796ca0..2054e557d0d2 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -1688,10 +1688,8 @@ void fastcall wake_up_new_task(struct task_struct *p, unsigned long clone_flags) | |||
1688 | else | 1688 | else |
1689 | p->sched_class = &fair_sched_class; | 1689 | p->sched_class = &fair_sched_class; |
1690 | 1690 | ||
1691 | if (!p->sched_class->task_new || !sysctl_sched_child_runs_first || | 1691 | if (task_cpu(p) != this_cpu || !p->sched_class->task_new || |
1692 | (clone_flags & CLONE_VM) || task_cpu(p) != this_cpu || | 1692 | !current->se.on_rq) { |
1693 | !current->se.on_rq) { | ||
1694 | |||
1695 | activate_task(rq, p, 0); | 1693 | activate_task(rq, p, 0); |
1696 | } else { | 1694 | } else { |
1697 | /* | 1695 | /* |