From: Ingo Molnar Date: Mon, 15 Oct 2007 15:00:01 +0000 (+0200) Subject: sched: fix sysctl_sched_child_runs_first flag X-Git-Tag: v2.6.24-rc1~1289^2~139 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44142fac3446d08c08c5d717ec11d50a737e8640;p=linux-2.6 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 Signed-off-by: Peter Zijlstra Signed-off-by: Mike Galbraith Reviewed-by: Thomas Gleixner --- diff --git a/kernel/sched.c b/kernel/sched.c index 6c10fa796c..2054e557d0 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) else p->sched_class = &fair_sched_class; - if (!p->sched_class->task_new || !sysctl_sched_child_runs_first || - (clone_flags & CLONE_VM) || task_cpu(p) != this_cpu || - !current->se.on_rq) { - + if (task_cpu(p) != this_cpu || !p->sched_class->task_new || + !current->se.on_rq) { activate_task(rq, p, 0); } else { /*