• P
    sched/fair: Rewrite PELT migration propagation · 0e2d2aaa
    Peter Zijlstra 提交于
    When an entity migrates in (or out) of a runqueue, we need to add (or
    remove) its contribution from the entire PELT hierarchy, because even
    non-runnable entities are included in the load average sums.
    
    In order to do this we have some propagation logic that updates the
    PELT tree, however the way it 'propagates' the runnable (or load)
    change is (more or less):
    
                         tg->weight * grq->avg.load_avg
      ge->avg.load_avg = ------------------------------
                                   tg->load_avg
    
    But that is the expression for ge->weight, and per the definition of
    load_avg:
    
      ge->avg.load_avg := ge->weight * ge->avg.runnable_avg
    
    That destroys the runnable_avg (by setting it to 1) we wanted to
    propagate.
    
    Instead directly propagate runnable_sum.
    Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: NIngo Molnar <mingo@kernel.org>
    0e2d2aaa
debug.c 24.3 KB