[lkml]   [2010]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[patch 1/3] sched: init rt_avg stat whenever rq comes online
    TSC's get reset after suspend/resume and this leads to a scenario of
    rq->clock (sched_clock_cpu()) less than rq->age_stamp. This leads
    to a big value returned by scale_rt_power() and the resulting big group
    power set by the update_group_power() is causing improper load balancing
    between busy and idle cpu's after suspend/resume.

    This resulted in multi-threaded workloads (like kernel-compilation) go slower
    after suspend/resume cycle on core i5 laptops.

    Realign rq->age_stamp to rq->clock and reset rq->rt_avg in rq_online_rt().

    Addresses the primary issue reported in the
    (Bad performance after suspend on Intel i7 and i5)

    Reported-by: Florian Pritz <>
    Signed-off-by: Suresh Siddha <>
    Cc: [2.6.32+]

    diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
    index d10c80e..a00af73 100644
    --- a/kernel/sched_rt.c
    +++ b/kernel/sched_rt.c
    @@ -1550,6 +1550,12 @@ static void rq_online_rt(struct rq *rq)

    cpupri_set(&rq->rd->cpupri, rq->cpu, rq->rt.highest_prio.curr);
    + /*
    + * Reset RT average stat and its time stamp.
    + */
    + rq->age_stamp = rq->clock;
    + rq->rt_avg = 0;

    /* Assumes rq->lock is held */

     \ /
      Last update: 2010-08-13 21:47    [W:0.020 / U:4.324 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site