Commit 44142fac authored by Ingo Molnar's avatar Ingo Molnar

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: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: default avatarMike Galbraith <efault@gmx.de>
Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 23fd5045
...@@ -1688,10 +1688,8 @@ void fastcall wake_up_new_task(struct task_struct *p, unsigned long clone_flags) ...@@ -1688,10 +1688,8 @@ void fastcall wake_up_new_task(struct task_struct *p, unsigned long clone_flags)
else else
p->sched_class = &fair_sched_class; p->sched_class = &fair_sched_class;
if (!p->sched_class->task_new || !sysctl_sched_child_runs_first || if (task_cpu(p) != this_cpu || !p->sched_class->task_new ||
(clone_flags & CLONE_VM) || task_cpu(p) != this_cpu || !current->se.on_rq) {
!current->se.on_rq) {
activate_task(rq, p, 0); activate_task(rq, p, 0);
} else { } else {
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment