• Peter Zijlstra's avatar
    sched: Fix more load-balancing fallout · eb95308e
    Peter Zijlstra authored
    Commits 367456c7 ("sched: Ditch per cgroup task lists for
    load-balancing") and 5d6523eb ("sched: Fix load-balance wreckage")
    left some more wreckage.
    
    By setting loop_max unconditionally to ->nr_running load-balancing
    could take a lot of time on very long runqueues (hackbench!). So keep
    the sysctl as max limit of the amount of tasks we'll iterate.
    
    Furthermore, the min load filter for migration completely fails with
    cgroups since inequality in per-cpu state can easily lead to such
    small loads :/
    
    Furthermore the change to add new tasks to the tail of the queue
    instead of the head seems to have some effect.. not quite sure I
    understand why.
    
    Combined these fixes solve the huge hackbench regression reported by
    Tim when hackbench is ran in a cgroup.
    Reported-by: default avatarTim Chen <tim.c.chen@linux.intel.com>
    Acked-by: default avatarTim Chen <tim.c.chen@linux.intel.com>
    Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Link: http://lkml.kernel.org/r/1335365763.28150.267.camel@twins
    [ got rid of the CONFIG_PREEMPT tuning and made small readability edits ]
    Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
    eb95308e
fair.c 140 KB