Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 119fe5e0 authored by Mike Galbraith's avatar Mike Galbraith Committed by Ingo Molnar
Browse files

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: default avatarMike Galbraith <efault@gmx.de>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 02e0431a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);
}