mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
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>
This commit is contained in:
parent
02e0431a3d
commit
119fe5e068
1 changed files with 3 additions and 0 deletions
|
@ -992,6 +992,9 @@ void set_task_cpu(struct task_struct *p, unsigned int new_cpu)
|
|||
if (p->se.block_start)
|
||||
p->se.block_start -= clock_offset;
|
||||
#endif
|
||||
if (likely(new_rq->cfs.min_vruntime))
|
||||
p->se.vruntime -= old_rq->cfs.min_vruntime -
|
||||
new_rq->cfs.min_vruntime;
|
||||
|
||||
__set_task_cpu(p, new_cpu);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue