]> git.karo-electronics.de Git - karo-tx-linux.git/commit
sched: Fix rq->clock synchronization when migrating tasks
authorPeter Zijlstra <peterz@infradead.org>
Thu, 19 Aug 2010 11:31:43 +0000 (13:31 +0200)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Thu, 6 Jan 2011 23:07:51 +0000 (18:07 -0500)
commit64c0d770b67e0bdab7addafd1e19cdcd94be87e3
tree8977c3b06d76d6c8d300337459a76d5bedbd4766
parentd9f7ec9b3727555ba55ad14bddb056468fc7e122
sched: Fix rq->clock synchronization when migrating tasks

commit 861d034ee814917a83bd5de4b26e3b8336ddeeb8 upstream.

sched_fork() -- we do task placement in ->task_fork_fair() ensure we
  update_rq_clock() so we work with current time. We leave the vruntime
  in relative state, so the time delay until wake_up_new_task() doesn't
  matter.

wake_up_new_task() -- Since task_fork_fair() left p->vruntime in
  relative state we can safely migrate, the activate_task() on the
  remote rq will call update_rq_clock() and causes the clock to be
  synced (enough).

Tested-by: Jack Daniel <wanders.thirst@gmail.com>
Tested-by: Philby John <pjohn@mvista.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1281002322.1923.1708.camel@laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
kernel/sched_fair.c