Messages in this thread Patch in this message | | | From | Frederic Weisbecker <> | Subject | [PATCH 1/5] sched: Update rq clock before migrating tasks out of dying CPU | Date | Fri, 12 Apr 2013 01:50:58 +0200 |
| |
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 entrypoint of the scheduler.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Li Zhong <zhong@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Paul Turner <pjt@google.com> Cc: Mike Galbraith <efault@gmx.de> --- kernel/sched/core.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index ee8c1bd..ec036d8 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -4928,6 +4928,13 @@ static void migrate_tasks(unsigned int dead_cpu) */ 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 ( ; ; ) { /* * There's this thread running, bail when that's the only -- 1.7.5.4
| |