Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310469
b: refs/heads/master
c: 74a5ce2
h: refs/heads/master
i:
  310467: 2e22bd3
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed May 30, 2012
1 parent ee6b485 commit dd1d2e1
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 8 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: 2ea45800d8e1c3c51c45a233d6bd6289a297a386
refs/heads/master: 74a5ce20e6eeeb3751340b390e7ac1d1d07bbf55
7 changes: 5 additions & 2 deletions trunk/kernel/sched/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -6030,11 +6030,14 @@ build_overlap_sched_groups(struct sched_domain *sd, int cpu)

cpumask_or(covered, covered, sg_span);

sg->sgp = *per_cpu_ptr(sdd->sgp, cpumask_first(sg_span));
sg->sgp = *per_cpu_ptr(sdd->sgp, i);
atomic_inc(&sg->sgp->ref);

if (cpumask_test_cpu(cpu, sg_span))
if ((!groups && cpumask_test_cpu(cpu, sg_span)) ||
cpumask_first(sg_span) == cpu) {
WARN_ON_ONCE(!cpumask_test_cpu(cpu, sg_span));
groups = sg;
}

if (!first)
first = sg;
Expand Down
25 changes: 20 additions & 5 deletions trunk/kernel/sched/fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -3574,11 +3574,26 @@ void update_group_power(struct sched_domain *sd, int cpu)

power = 0;

group = child->groups;
do {
power += group->sgp->power;
group = group->next;
} while (group != child->groups);
if (child->flags & SD_OVERLAP) {
/*
* SD_OVERLAP domains cannot assume that child groups
* span the current group.
*/

for_each_cpu(cpu, sched_group_cpus(sdg))
power += power_of(cpu);
} else {
/*
* !SD_OVERLAP domains can assume that child groups
* span the current group.
*/

group = child->groups;
do {
power += group->sgp->power;
group = group->next;
} while (group != child->groups);
}

sdg->sgp->power = power;
}
Expand Down

0 comments on commit dd1d2e1

Please sign in to comment.