aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched_fair.c
diff options
context:
space:
mode:
authorGautham R Shenoy <ego@in.ibm.com>2010-01-20 15:02:44 -0500
committerIngo Molnar <mingo@elte.hu>2010-01-21 07:40:17 -0500
commit871e35bc9733f273eaf5ceb69bbd0423b58e5285 (patch)
tree0c740fdbba9ade54143834ce52581b2d76a23795 /kernel/sched_fair.c
parent8f190fb3f7a405682666d3723f6ec370b5afe4da (diff)
sched: Fix the place where group powers are updated
We want to update the sched_group_powers when balance_cpu == this_cpu. Currently the group powers are updated only if the balance_cpu is the first CPU in the local group. But balance_cpu = this_cpu could also be the first idle cpu in the group. Hence fix the place where the group powers are updated. Signed-off-by: Gautham R Shenoy <ego@in.ibm.com> Signed-off-by: Joel Schopp <jschopp@austin.ibm.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <1264017764.5717.127.camel@jschopp-laptop> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r--kernel/sched_fair.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 0b482f5b5b3b..22231ccb2f98 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -2418,11 +2418,8 @@ static inline void update_sg_lb_stats(struct sched_domain *sd,
2418 unsigned long sum_avg_load_per_task; 2418 unsigned long sum_avg_load_per_task;
2419 unsigned long avg_load_per_task; 2419 unsigned long avg_load_per_task;
2420 2420
2421 if (local_group) { 2421 if (local_group)
2422 balance_cpu = group_first_cpu(group); 2422 balance_cpu = group_first_cpu(group);
2423 if (balance_cpu == this_cpu)
2424 update_group_power(sd, this_cpu);
2425 }
2426 2423
2427 /* Tally up the load of all CPUs in the group */ 2424 /* Tally up the load of all CPUs in the group */
2428 sum_avg_load_per_task = avg_load_per_task = 0; 2425 sum_avg_load_per_task = avg_load_per_task = 0;
@@ -2470,6 +2467,8 @@ static inline void update_sg_lb_stats(struct sched_domain *sd,
2470 return; 2467 return;
2471 } 2468 }
2472 2469
2470 update_group_power(sd, this_cpu);
2471
2473 /* Adjust by relative CPU power of the group */ 2472 /* Adjust by relative CPU power of the group */
2474 sgs->avg_load = (sgs->group_load * SCHED_LOAD_SCALE) / group->cpu_power; 2473 sgs->avg_load = (sgs->group_load * SCHED_LOAD_SCALE) / group->cpu_power;
2475 2474