diff options
author | Ingo Molnar <mingo@elte.hu> | 2007-10-15 17:00:14 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2007-10-15 17:00:14 +0200 |
commit | 00bf7bfc2eaf775b634774e9ec435d720b6ecee7 (patch) | |
tree | 1f816516361276a56b9dee6b39e90361dc3468be /kernel/sched.c | |
parent | 0702e3ebc1e42576a04d29f8adacf13be825b800 (diff) | |
download | op-kernel-dev-00bf7bfc2eaf775b634774e9ec435d720b6ecee7.zip op-kernel-dev-00bf7bfc2eaf775b634774e9ec435d720b6ecee7.tar.gz |
sched: fix: move the CPU check into ->task_new_fair()
noticed by Peter Zijlstra:
fix: move the CPU check into ->task_new_fair(), this way we
can call place_entity() and get child ->vruntime right at
initial wakeup time.
(without this there can be large latencies)
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index f2b8db4..b41ef66 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -1660,17 +1660,14 @@ void fastcall wake_up_new_task(struct task_struct *p, unsigned long clone_flags) { unsigned long flags; struct rq *rq; - int this_cpu; rq = task_rq_lock(p, &flags); BUG_ON(p->state != TASK_RUNNING); - this_cpu = smp_processor_id(); /* parent's CPU */ update_rq_clock(rq); p->prio = effective_prio(p); - if (task_cpu(p) != this_cpu || !p->sched_class->task_new || - !current->se.on_rq) { + if (!p->sched_class->task_new || !current->se.on_rq || !rq->cfs.curr) { activate_task(rq, p, 0); } else { /* |