aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/sched.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 934f615ccceb..71e8dcaf2c79 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -3386,8 +3386,17 @@ static inline void update_sd_lb_stats(struct sched_domain *sd, int this_cpu,
3386 int load_idx; 3386 int load_idx;
3387 3387
3388#if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT) 3388#if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT)
3389 sds->power_savings_balance = 1; 3389 /*
3390 sds->min_nr_running = ULONG_MAX; 3390 * Busy processors will not participate in power savings
3391 * balance.
3392 */
3393 if (idle == CPU_NOT_IDLE || !(sd->flags & SD_POWERSAVINGS_BALANCE))
3394 sds->power_savings_balance = 0;
3395 else {
3396 sds->power_savings_balance = 1;
3397 sds->min_nr_running = ULONG_MAX;
3398 sds->leader_nr_running = 0;
3399 }
3391#endif 3400#endif
3392 load_idx = get_sd_load_idx(sd, idle); 3401 load_idx = get_sd_load_idx(sd, idle);
3393 3402
@@ -3422,12 +3431,8 @@ static inline void update_sd_lb_stats(struct sched_domain *sd, int this_cpu,
3422 } 3431 }
3423 3432
3424#if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT) 3433#if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT)
3425 /* 3434
3426 * Busy processors will not participate in power savings 3435 if (!sds->power_savings_balance)
3427 * balance.
3428 */
3429 if (idle == CPU_NOT_IDLE ||
3430 !(sd->flags & SD_POWERSAVINGS_BALANCE))
3431 goto group_next; 3436 goto group_next;
3432 3437
3433 /* 3438 /*
@@ -3651,7 +3656,7 @@ find_busiest_group(struct sched_domain *sd, int this_cpu,
3651 3656
3652out_balanced: 3657out_balanced:
3653#if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT) 3658#if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT)
3654 if (idle == CPU_NOT_IDLE || !(sd->flags & SD_POWERSAVINGS_BALANCE)) 3659 if (!sds.power_savings_balance)
3655 goto ret; 3660 goto ret;
3656 3661
3657 if (sds.this != sds.group_leader || sds.group_leader == sds.group_min) 3662 if (sds.this != sds.group_leader || sds.group_leader == sds.group_min)