lkml.org 
[lkml]   [2013]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 1/5] sched: Update rq clock before migrating tasks out of dying CPU
    Date
    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


    \
     
     \ /
      Last update: 2013-04-12 02:21    [W:2.842 / U:0.740 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site