• Vincent Guittot's avatar
    sched/fair: Fix rounding bug for asym packing · 4ad4e481
    Vincent Guittot authored
    When check_asym_packing() is triggered, the imbalance is set to:
    
      busiest_stat.avg_load * busiest_stat.group_capacity / SCHED_CAPACITY_SCALE
    
    But busiest_stat.avg_load equals:
    
      sgs->group_load * SCHED_CAPACITY_SCALE / sgs->group_capacity
    
    These divisions can generate a rounding that will make imbalance
    slightly lower than the weighted load of the cfs_rq.  But this is
    enough to skip the rq in find_busiest_queue() and prevents asym
    migration from happening.
    
    Directly set imbalance to busiest's sgs->group_load to remove the
    rounding.
    Signed-off-by: default avatarVincent Guittot <vincent.guittot@linaro.org>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: valentin.schneider@arm.com
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
    4ad4e481
fair.c 281 KB