]> err.no Git - linux-2.6/commitdiff
sched: fix sysctl_sched_child_runs_first flag
authorIngo Molnar <mingo@elte.hu>
Mon, 15 Oct 2007 15:00:01 +0000 (17:00 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 15 Oct 2007 15:00:01 +0000 (17:00 +0200)
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>
kernel/sched.c

index 6c10fa796ca040ef8da1f1e65acd58e4d7644faa..2054e557d0d20bd2e3a350f915c1a2927d33758b 100644 (file)
@@ -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 {
                /*