aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2013-04-11 19:50:58 -0400
committerIngo Molnar <mingo@kernel.org>2013-05-28 03:40:23 -0400
commit77bd39702f0b3840cea17681409270b16a3b93c0 (patch)
tree4cbd6175cbec0492dcf244d7b4e43a02a559bdce /kernel/sched
parentc5405a495e88d93cf9b4f4cc91507c7f4afcb901 (diff)
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: Frederic 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: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1365724262-20142-2-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched')
-rw-r--r--kernel/sched/core.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 79e48e6a9385..7bf0418dc60f 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -4378,6 +4378,13 @@ static void migrate_tasks(unsigned int dead_cpu)
4378 */ 4378 */
4379 rq->stop = NULL; 4379 rq->stop = NULL;
4380 4380
4381 /*
4382 * put_prev_task() and pick_next_task() sched
4383 * class method both need to have an up-to-date
4384 * value of rq->clock[_task]
4385 */
4386 update_rq_clock(rq);
4387
4381 for ( ; ; ) { 4388 for ( ; ; ) {
4382 /* 4389 /*
4383 * There's this thread running, bail when that's the only 4390 * There's this thread running, bail when that's the only