sched: cgroup: Implement different treatment for idle shares
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Thu, 3 Dec 2009 17:00:07 +0000 (18:00 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 10 Aug 2010 17:20:35 +0000 (10:20 -0700)
commit4e4a55ada236bf7d10669a2732c6f964bcfdba8d
tree0a71a7e3339da67b770f396fca9011a8648081ca
parentf23dc93c0e6772577309e150daf1906dbfd9d43b
sched: cgroup: Implement different treatment for idle shares

commit cd8ad40de36c2fe75f3b731bd70198b385895246 upstream.

When setting the weight for a per-cpu task-group, we have to put in a
phantom weight when there is no work on that cpu, otherwise we'll not
service that cpu when new work gets placed there until we again update
the per-cpu weights.

We used to add these phantom weights to the total, so that the idle
per-cpu shares don't get inflated, this however causes the non-idle
parts to get deflated, causing unexpected weight distibutions.

Reverse this, so that the non-idle shares are correct but the idle
shares are inflated.

Reported-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Tested-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1257934048.23203.76.camel@twins>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/sched.c