Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310639
b: refs/heads/master
c: c3decf0
h: refs/heads/master
i:
  310637: 532d71f
  310635: a3836f8
  310631: 0677786
  310623: 29e8975
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Jun 6, 2012
1 parent 8b30f4b commit e917ca7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c1174876874dcf8986806e4dad3d7d07af20b439
refs/heads/master: c3decf0dfbc95736b7c0ab68fa4e5854c4734da9
13 changes: 12 additions & 1 deletion trunk/kernel/sched/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -5604,7 +5604,12 @@ static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level,
break;
}

if (!group->sgp->power) {
/*
* Even though we initialize ->power to something semi-sane,
* we leave power_orig unset. This allows us to detect if
* domain iteration is still funny without causing /0 traps.
*/
if (!group->sgp->power_orig) {
printk(KERN_CONT "\n");
printk(KERN_ERR "ERROR: domain->cpu_power not "
"set\n");
Expand Down Expand Up @@ -6075,6 +6080,12 @@ build_overlap_sched_groups(struct sched_domain *sd, int cpu)
if (atomic_inc_return(&sg->sgp->ref) == 1)
build_group_mask(sd, sg);

/*
* Initialize sgp->power such that even if we mess up the
* domains and no possible iteration will get us here, we won't
* die on a /0 trap.
*/
sg->sgp->power = SCHED_POWER_SCALE * cpumask_weight(sg_span);

/*
* Make sure the first group of this domain contains the
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/sched/fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -3602,7 +3602,7 @@ void update_group_power(struct sched_domain *sd, int cpu)
} while (group != child->groups);
}

sdg->sgp->power = power;
sdg->sgp->power_orig = sdg->sgp->power = power;
}

/*
Expand Down

0 comments on commit e917ca7

Please sign in to comment.