|
@@ -8523,9 +8523,15 @@ static void init_sched_groups_power(int cpu, struct sched_domain *sd)
|
|
|
weight = cpumask_weight(sched_domain_span(sd));
|
|
|
/*
|
|
|
* SMT siblings share the power of a single core.
|
|
|
+ * Usually multiple threads get a better yield out of
|
|
|
+ * that one core than a single thread would have,
|
|
|
+ * reflect that in sd->smt_gain.
|
|
|
*/
|
|
|
- if ((sd->flags & SD_SHARE_CPUPOWER) && weight > 1)
|
|
|
+ if ((sd->flags & SD_SHARE_CPUPOWER) && weight > 1) {
|
|
|
+ power *= sd->smt_gain;
|
|
|
power /= weight;
|
|
|
+ power >>= SCHED_LOAD_SHIFT;
|
|
|
+ }
|
|
|
sg_inc_cpu_power(sd->groups, power);
|
|
|
return;
|
|
|
}
|