• J
    sched/fair: Calculate runnable_weight slightly differently · 2c8e4dce
    Josef Bacik 提交于
    Our runnable_weight currently looks like this
    
    runnable_weight = shares * runnable_load_avg / load_avg
    
    The goal is to scale the runnable weight for the group based on its runnable to
    load_avg ratio.  The problem with this is it biases us towards tasks that never
    go to sleep.  Tasks that go to sleep are going to have their runnable_load_avg
    decayed pretty hard, which will drastically reduce the runnable weight of groups
    with interactive tasks.  To solve this imbalance we tweak this slightly, so in
    the ideal case it is still the above, but in the interactive case it is
    
    runnable_weight = shares * runnable_weight / load_weight
    
    which will make the weight distribution fairer between interactive and
    non-interactive groups.
    Signed-off-by: NJosef Bacik <jbacik@fb.com>
    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: kernel-team@fb.com
    Cc: linux-kernel@vger.kernel.org
    Cc: riel@redhat.com
    Cc: tj@kernel.org
    Link: http://lkml.kernel.org/r/1501773219-18774-2-git-send-email-jbacik@fb.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
    2c8e4dce
fair.c 258.6 KB