]> git.baikalelectronics.ru Git - kernel.git/commit
sched: Fix cgroup smp fairness
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Mon, 27 Jul 2009 12:04:49 +0000 (14:04 +0200)
committerIngo Molnar <mingo@elte.hu>
Sun, 2 Aug 2009 12:26:06 +0000 (14:26 +0200)
commit94437abadde63d3edc04bb4a607dbba2e93fcc3a
treed4beb94aa2e454a6d23425cac856654e507541a1
parentb6cf162a98a3f77a4820ed729e3474b8238355af
sched: Fix cgroup smp fairness

Commit 7ec1f591f8c6150d2fd612fde1b7141835aa5161 ("fix
inconsistency when redistribute per-cpu tg->cfs_rq shares")
broke cgroup smp fairness.

In order to avoid starvation of newly placed tasks, we never
quite set the share of an empty cpu group-task to 0, but
instead we set it as if there's a single NICE-0 task present.

If however we actually set this in cfs_rq[cpu]->shares, that
means the total shares for that group will be slightly inflated
every time we balance, causing the observed unfairness.

Fix this by setting cfs_rq[cpu]->shares to 0 but actually
setting the effective weight of the related se to the inflated
number.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1248696557.6987.1615.camel@twins>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched.c