Skip to contentSkip to conversation

turbostat: fix PC6 displaying on some systems

PATCH RESEND In review Artem Bityutskiy 2 participants 2 messages Mar 8, 2022 Turbostat utility

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 turbostat: fix PC6 displaying on some systems

From: Artem Bityutskiy <[email protected]>

'MSR_PKG_CST_CONFIG_CONTROL' encodes the deepest allowed package C-state limit, and turbostat decodes it.

Before this patch: turbostat does not recognize value "3" on Ice Lake Xeon (ICX) and Sapphire Rapids Xeon (SPR), treats it as "unknown", and does not display any package C-states in the results table.

After this patch: turbostat recognizes value 3 on ICX and SPR, treats it as "PC6", and correctly displays package C-states in the results table.

---
 tools/power/x86/turbostat/turbostat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Note 1: I apologize for submitting this patch several times. I clearly forgot how to use 'git send-email' and missed the '--dry-run' option. Sorry for this.

Note 2: this patch is a rebased version of the same patch I sent earlier:
https://patchwork.kernel.org/project/linux-pm/patch/[email protected]/

tools/power/x86/turbostat/turbostat.c +1 -1
index 47d3ba895d6d..bc5ae0872fed 100644
@@ -2323,7 +2323,7 @@ int skx_pkg_cstate_limits[16] =
 };
 
 int icx_pkg_cstate_limits[16] =
-    { PCL__0, PCL__2, PCL__6, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLUNL, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV,
+    { PCL__0, PCL__2, PCL__6, PCL__6, PCLRSV, PCLRSV, PCLRSV, PCLUNL, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV,
 	PCLRSV, PCLRSV
 };
 
Signature · 1 line
2.31.1
#1 lore raw
Quoted 29 lines · Artem Bityutskiy

From: Artem Bityutskiy <[email protected]>

'MSR_PKG_CST_CONFIG_CONTROL' encodes the deepest allowed package C-state limit, and turbostat decodes it.

Before this patch: turbostat does not recognize value "3" on Ice Lake Xeon (ICX) and Sapphire Rapids Xeon (SPR), treats it as "unknown", and does not display any package C-states in the results table.

After this patch: turbostat recognizes value 3 on ICX and SPR, treats it as "PC6", and correctly displays package C-states in the results table.

---
 tools/power/x86/turbostat/turbostat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Note 1: I apologize for submitting this patch several times. I clearly forgot how to use 'git send-email' and missed the '--dry-run' option. Sorry for this.

Note 2: this patch is a rebased version of the same patch I sent earlier:
https://patchwork.kernel.org/project/linux-pm/patch/[email protected]/

tools/power/x86/turbostat/turbostat.c +0 -0
index 47d3ba895d6d..bc5ae0872fed 100644

tools/power/x86/turbostat/turbostat.c int skx_pkg_cstate_limits[16] =

Quoted 9 lines
tools/power/x86/turbostat/turbostat.c +1 -2
@@ -2323,7 +2323,7 @@ int skx_pkg_cstate_limits[16] =
 };
 
 int icx_pkg_cstate_limits[16] =
-    { PCL__0, PCL__2, PCL__6, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLUNL, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV,
+    { PCL__0, PCL__2, PCL__6, PCL__6, PCLRSV, PCLRSV, PCLRSV, PCLUNL, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV,
        PCLRSV, PCLRSV
 };
 
--

turbostat material has been handled by Len so far, but I've queued up this patch for 5.18.

Thanks!