sched/fair: Add some serialization to the sched_domain load-balance walk

Since the sched_domain walk is completely unserialized (!SD_SERIALIZE)
it is possible that multiple cpus in the group get elected to do the
next level. Avoid this by adding some serialization.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-vqh9ai6s0ewmeakjz80w4qz6@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
Peter Zijlstra
2012-04-25 00:30:36 +02:00
committed by Ingo Molnar
parent c22402a2f7
commit 0ce90475dc
3 changed files with 10 additions and 2 deletions

View File

@@ -927,6 +927,7 @@ struct sched_group_power {
struct sched_group {
struct sched_group *next; /* Must be a circular list */
atomic_t ref;
int balance_cpu;
unsigned int group_weight;
struct sched_group_power *sgp;