Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135716
b: refs/heads/master
c: 6dfdb06
h: refs/heads/master
v: v3
  • Loading branch information
Gautham R Shenoy authored and Ingo Molnar committed Mar 25, 2009
1 parent d6bf64c commit 1f600c9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 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: 67bb6c036d1fc3d332c8527a36a546e3e72e822c
refs/heads/master: 6dfdb0629019f307ab18864b1fd3e5dbb02f383c
32 changes: 17 additions & 15 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -3403,14 +3403,14 @@ find_busiest_group(struct sched_domain *sd, int this_cpu,
* capacity but still has some space to pick up some load
* from other group and save more power
*/
if (sum_nr_running <= group_capacity - 1) {
if (sum_nr_running > leader_nr_running ||
(sum_nr_running == leader_nr_running &&
group_first_cpu(group) <
group_first_cpu(group_leader))) {
group_leader = group;
leader_nr_running = sum_nr_running;
}
if (sum_nr_running > group_capacity - 1)
goto group_next;

if (sum_nr_running > leader_nr_running ||
(sum_nr_running == leader_nr_running &&
group_first_cpu(group) < group_first_cpu(group_leader))) {
group_leader = group;
leader_nr_running = sum_nr_running;
}
group_next:
#endif
Expand Down Expand Up @@ -3531,14 +3531,16 @@ find_busiest_group(struct sched_domain *sd, int this_cpu,
if (idle == CPU_NOT_IDLE || !(sd->flags & SD_POWERSAVINGS_BALANCE))
goto ret;

if (this == group_leader && group_leader != group_min) {
*imbalance = min_load_per_task;
if (sched_mc_power_savings >= POWERSAVINGS_BALANCE_WAKEUP) {
cpu_rq(this_cpu)->rd->sched_mc_preferred_wakeup_cpu =
group_first_cpu(group_leader);
}
return group_min;
if (this != group_leader || group_leader == group_min)
goto ret;

*imbalance = min_load_per_task;
if (sched_mc_power_savings >= POWERSAVINGS_BALANCE_WAKEUP) {
cpu_rq(this_cpu)->rd->sched_mc_preferred_wakeup_cpu =
group_first_cpu(group_leader);
}
return group_min;

#endif
ret:
*imbalance = 0;
Expand Down

0 comments on commit 1f600c9

Please sign in to comment.