aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index ecb4a47d4214..55112261027b 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -8523,9 +8523,15 @@ static void init_sched_groups_power(int cpu, struct sched_domain *sd)
8523 weight = cpumask_weight(sched_domain_span(sd)); 8523 weight = cpumask_weight(sched_domain_span(sd));
8524 /* 8524 /*
8525 * SMT siblings share the power of a single core. 8525 * SMT siblings share the power of a single core.
8526 * Usually multiple threads get a better yield out of
8527 * that one core than a single thread would have,
8528 * reflect that in sd->smt_gain.
8526 */ 8529 */
8527 if ((sd->flags & SD_SHARE_CPUPOWER) && weight > 1) 8530 if ((sd->flags & SD_SHARE_CPUPOWER) && weight > 1) {
8531 power *= sd->smt_gain;
8528 power /= weight; 8532 power /= weight;
8533 power >>= SCHED_LOAD_SHIFT;
8534 }
8529 sg_inc_cpu_power(sd->groups, power); 8535 sg_inc_cpu_power(sd->groups, power);
8530 return; 8536 return;
8531 } 8537 }