sched: Sanitize fork() handling
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Fri, 27 Nov 2009 16:32:46 +0000 (17:32 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 9 Dec 2009 09:03:05 +0000 (10:03 +0100)
commitcd29fe6f2637cc2ccbda5ac65f5332d6bf5fa3c6
treeb4206012d424a8c0bce1f260d042c678db0602a2
parentab19cb23313733c55e0517607844b86720b35f5f
sched: Sanitize fork() handling

Currently we try to do task placement in wake_up_new_task() after we do
the load-balance pass in sched_fork(). This yields complicated semantics
in that we have to deal with tasks on different RQs and the
set_task_cpu() calls in copy_process() and sched_fork()

Rename ->task_new() to ->task_fork() and call it from sched_fork()
before the balancing, this gives the policy a clear point to place the
task.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/sched.h
kernel/sched.c
kernel/sched_fair.c