From: Peter Zijlstra Date: Fri, 27 Jun 2008 11:41:25 +0000 (+0200) Subject: sched: fix sched_balance_self() smp group balancing X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=039a1c41b3a489e34593ea1e1687f6fdad6b13ab;p=openwrt%2Fstaging%2Fblogic.git sched: fix sched_balance_self() smp group balancing Finding the least idle cpu is more accurate when done with updated shares. Signed-off-by: Peter Zijlstra Cc: Srivatsa Vaddagiri Cc: Mike Galbraith Signed-off-by: Ingo Molnar --- diff --git a/kernel/sched.c b/kernel/sched.c index cdd09462fc98..39d5495540d2 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -2128,6 +2128,9 @@ static int sched_balance_self(int cpu, int flag) sd = tmp; } + if (sd) + update_shares(sd); + while (sd) { cpumask_t span, tmpmask; struct sched_group *group;