diff options
author | Mike Galbraith <efault@gmx.de> | 2007-10-15 11:00:07 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2007-10-15 11:00:07 -0400 |
commit | 119fe5e06800afc197781ebc8c2d8ca7d03497c8 (patch) | |
tree | 9e2c57360f6d7442b6e6e1e2c15542805f322231 /kernel/sched.c | |
parent | 02e0431a3db554019b816936b597d618256b705d (diff) |
sched: fix SMP migration latencies
fix SMP migration latencies: the vruntimes of different CPUs are
at incompatible offsets so they have to be fixed up when migrating
a task across CPUs.
Signed-off-by: Mike Galbraith <efault@gmx.de>
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>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 0f0cf374c775..4ad789d268fe 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -992,6 +992,9 @@ void set_task_cpu(struct task_struct *p, unsigned int new_cpu) | |||
992 | if (p->se.block_start) | 992 | if (p->se.block_start) |
993 | p->se.block_start -= clock_offset; | 993 | p->se.block_start -= clock_offset; |
994 | #endif | 994 | #endif |
995 | if (likely(new_rq->cfs.min_vruntime)) | ||
996 | p->se.vruntime -= old_rq->cfs.min_vruntime - | ||
997 | new_rq->cfs.min_vruntime; | ||
995 | 998 | ||
996 | __set_task_cpu(p, new_cpu); | 999 | __set_task_cpu(p, new_cpu); |
997 | } | 1000 | } |