sched: fix sched_fork()
authorIngo Molnar <mingo@elte.hu>
Mon, 15 Oct 2007 15:00:11 +0000 (17:00 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 15 Oct 2007 15:00:11 +0000 (17:00 +0200)
fix sched_fork(): large latencies at new task creation time because
the ->vruntime was not fixed up cross-CPU, if the parent got migrated
after the child's CPU got set up.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
kernel/sched.c

index 744bd50..36484da 100644 (file)
@@ -1657,7 +1657,7 @@ void sched_fork(struct task_struct *p, int clone_flags)
 #ifdef CONFIG_SMP
        cpu = sched_balance_self(cpu, SD_BALANCE_FORK);
 #endif
-       __set_task_cpu(p, cpu);
+       set_task_cpu(p, cpu);
 
        /*
         * Make sure we do not leak PI boosting priority to the child: