Commit 8e6598af3f35629c37249a610cf13e73f70db279
Committed by
Ingo Molnar
1 parent
47fe38fcff
Exists in
master
and in
4 other branches
sched: Feature to disable APERF/MPERF cpu_power
I suspect a feed-back loop between cpuidle and the aperf/mperf cpu_power bits, where when we have idle C-states lower the ratio, which leads to lower cpu_power and then less load, which generates more idle time, etc.. Put in a knob to disable it. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Showing 2 changed files with 15 additions and 2 deletions Side-by-side Diff
kernel/sched.c
... | ... | @@ -3602,11 +3602,19 @@ |
3602 | 3602 | unsigned long power = SCHED_LOAD_SCALE; |
3603 | 3603 | struct sched_group *sdg = sd->groups; |
3604 | 3604 | |
3605 | - power *= arch_scale_freq_power(sd, cpu); | |
3605 | + if (sched_feat(ARCH_POWER)) | |
3606 | + power *= arch_scale_freq_power(sd, cpu); | |
3607 | + else | |
3608 | + power *= default_scale_freq_power(sd, cpu); | |
3609 | + | |
3606 | 3610 | power >>= SCHED_LOAD_SHIFT; |
3607 | 3611 | |
3608 | 3612 | if ((sd->flags & SD_SHARE_CPUPOWER) && weight > 1) { |
3609 | - power *= arch_scale_smt_power(sd, cpu); | |
3613 | + if (sched_feat(ARCH_POWER)) | |
3614 | + power *= arch_scale_smt_power(sd, cpu); | |
3615 | + else | |
3616 | + power *= default_scale_smt_power(sd, cpu); | |
3617 | + | |
3610 | 3618 | power >>= SCHED_LOAD_SHIFT; |
3611 | 3619 | } |
3612 | 3620 |
kernel/sched_features.h