Skip to content

idle, Honor Hardware Disabled States

Prarit Bhargava linux-pm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3idle, rename MSR_NHM_SNB_PKG_CST_CFG_CTL to MSR_PKG_CST_CONFIG_CONTROLarch/x86/include/asm/msr-index.h drivers/idle/intel_idle.c tools/power/x86/turbostat/turbostat.8 +1 more+9 -91 reply
2/3intel_idle, Introduce cstate limits and fix hardware cstate disable valuedrivers/idle/intel_idle.c include/linux/cpuidle.h+88 -00 replies
3/3cpuidle, Prevent users from enabling cstates that are disabled in Hardwaredrivers/cpuidle/governors/ladder.c drivers/cpuidle/governors/menu.c drivers/cpuidle/sysfs.c +2 more+51 -60 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchPrarit Bhargava
SeriesA-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] idle, Honor Hardware Disabled States

Some Intel processors have cstates limited by MSR_PKG_CST_CONFIG_CONTROL (0xE2), which specifies the lowest processor-specific C-state code name (consuming the least power). The intel_idle driver does not query this MSR to see if states are limited by hardware. In the case of the i7-6700HQ the value of bits 3:0 on the MSR are 0x6, meaning that C9-SKL (0x7) and C10-SKL (0x8) should have been disabled.

This patch adds a limit field to the cpuidle_state struct to hold the cstate encodings for each processor, and queries the values the values to confirm support.

After applying this patchset the system now boots and reports that some states have been disabled:

[root@dhcp40-125 ~]# dmesg | grep intel_idle

[    1.163367] intel_idle: MWAIT substates: 0x11142120
[    1.163368] intel_idle: v0.4 model 0x5E
[    1.163369] intel_idle: lapic_timer_reliable_states 0xffffffff
[    1.163370] intel_idle: state C9-SKL (0x7) is disabled.  Max Package limit is 0x6.
[    1.163371] intel_idle: state C10-SKL (0x8) is disabled.  Max Package limit is 0x6.
Cc Len Brown <[email protected]>
Cc "Peter Zijlstra (Intel)" <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Andi Kleen <[email protected]>
Cc Alexander Shishkin <[email protected]>
Cc Dasaratharaman Chandramouli <[email protected]>

Prarit Bhargava (3):
idle, rename MSR_NHM_SNB_PKG_CST_CFG_CTL to
MSR_PKG_CST_CONFIG_CONTROL
intel_idle, Introduce cstate limits and fix hardware cstate disable
value
cpuidle, Prevent users from enabling cstates that are disabled in
Hardware

 arch/x86/include/asm/msr-index.h      |    2 +-
 drivers/cpuidle/governors/ladder.c    |    3 ++
 drivers/cpuidle/governors/menu.c      |    4 ++
 drivers/cpuidle/sysfs.c               |   34 +++++++++++-
 drivers/idle/intel_idle.c             |   93 ++++++++++++++++++++++++++++++++-
 include/linux/cpuidle.h               |   11 +++-
 tools/power/x86/turbostat/turbostat.8 |    2 +-
 tools/power/x86/turbostat/turbostat.c |   10 ++--
 8 files changed, 146 insertions(+), 13 deletions(-)
Signature · 1 line
1.7.9.3