Commit 77bd3970 authored by Frederic Weisbecker's avatar Frederic Weisbecker Committed by Ingo Molnar

sched: Update rq clock before migrating tasks out of dying CPU

Because the sched_class::put_prev_task() callback of rt and fair
classes are referring to the rq clock to update their runtime
statistics. There is a missing rq clock update from the CPU
hotplug notifier's entry point of the scheduler.
Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
Cc: Li Zhong <zhong@linux.vnet.ibm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Paul Turner <pjt@google.com>
Cc: Mike Galbraith <efault@gmx.de>
Signed-off-by: default avatarPeter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1365724262-20142-2-git-send-email-fweisbec@gmail.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent c5405a49
...@@ -4378,6 +4378,13 @@ static void migrate_tasks(unsigned int dead_cpu) ...@@ -4378,6 +4378,13 @@ static void migrate_tasks(unsigned int dead_cpu)
*/ */
rq->stop = NULL; rq->stop = NULL;
/*
* put_prev_task() and pick_next_task() sched
* class method both need to have an up-to-date
* value of rq->clock[_task]
*/
update_rq_clock(rq);
for ( ; ; ) { for ( ; ; ) {
/* /*
* There's this thread running, bail when that's the only * There's this thread running, bail when that's the only
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment