• Thomas Gleixner's avatar
    sched: fix load average accounting vs. cpu hotplug · a468d389
    Thomas Gleixner authored
    The new load average code clears rq->calc_load_active on
    CPU_ONLINE. That's wrong as the new onlined CPU might have got a
    scheduler tick already and accounted the delta to the stale value of
    the time we offlined the CPU.
    
    Clear the value when we cleanup the dead CPU instead. 
    
    Also move the update of the calc_load_update time for the newly online
    CPU to CPU_UP_PREPARE to avoid that the CPU plays catch up with the
    stale update time value.
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    a468d389
sched.c 259 KB