Re: load balancing regression since commit 367456c7

From: Tim Chen
Date: Wed Apr 25 2012 - 13:58:43 EST


On Wed, 2012-04-25 at 19:43 +0200, Peter Zijlstra wrote:
> Gargh.. lost the change to kernel/sched/features.h, now included.
>
> Sorry for that.
>
> ---
> Subject: sched: Fix more load-balance fallout
> From: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
> Date: Tue Apr 17 13:38:40 CEST 2012
>
> Commits 367456c756a6 ("sched: Ditch per cgroup task lists for
> load-balancing") and 5d6523ebd ("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: Tim Chen <tim.c.chen@xxxxxxxxxxxxxxx>
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
> Link: 1335365763.28150.267.camel@twins">http://lkml.kernel.org/r/1335365763.28150.267.camel@twins

The patch fixed the regression for me.

Acked-by: Tim Chen <tim.c.chen@xxxxxxxxxxxxxxx>


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/