Skip to content

Commit

Permalink
sched: fix sched_balance_self() smp group balancing
Browse files Browse the repository at this point in the history
Finding the least idle cpu is more accurate when done with updated shares.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Cc: Mike Galbraith <efault@gmx.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Jun 27, 2008
1 parent 3e5459b commit 039a1c4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kernel/sched.c
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 039a1c4

Please sign in to comment.