turbostat: Fix Haswell Core systems
PATCH 1/1 turbostat: Fix Haswell Core systems
On Haswell (model 0x3C) turbostat fails with
turbostat: cpu0: msr offset 0x630 read failed: Input/output error
because Haswell Core does not have C8-C10.
Output C8-C10 only on Haswell ULT.
numbers")
Cc: Len Brown <[email protected]>
--- tools/power/x86/turbostat/turbostat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/power/x86/turbostat/turbostat.c +1 -1
@@ -4296,7 +4296,7 @@ int has_hsw_msrs(unsigned int family, unsigned int model)return 0 ;switch (model) { -case INTEL_FAM6_HASWELL_CORE : +case INTEL_FAM6_HASWELL_ULT :case INTEL_FAM6_BROADWELL_CORE :/* BDW */ case INTEL_FAM6_SKYLAKE_MOBILE :/* SKL */ case INTEL_FAM6_CANNONLAKE_MOBILE :/* CNL */
Signature · 1 line
2.21.0
Hi,
Quoted 7 lines
On Haswell (model
0x3C) turbostat fails withturbostat: cpu0: msr offset
0x630read failed: Input/output errorbecause Haswell Core does not have C8-C10.
Output C8-C10 only on Haswell ULT.
has_hsw_msrs() uses the model number returned by intel_model_duplicates(), but commit f5a4c76ad7de added code to return INTEL_FAM6_HASWELL_CORE for INTEL_FAM6_HASWELL_ULT there. So I think Haswell UTL also doesn't output C8-C10 with your patch.
Something similar to the below patch is needed to differentiate between INTEL_FAM6_HASWELL_CORE and INTEL_FAM6_HASWELL_ULT. I don't have a Haswell-ULT machine, so I've only tested it on a Haswell-DT CPU.
Best regards.
Quoted 22 lines
Fixes f5a4c76ad7de ("tools/power turbostat: consolidate duplicate modelnumbers")
Cc: Len Brown <[email protected]>--- tools/power/x86/turbostat/turbostat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/power/x86/turbostat/turbostat.c +1
-1@@ -4296,7 +4296,7 @@ int has_hsw_msrs(unsigned int family, unsigned int model)return 0 ;switch (model) { -case INTEL_FAM6_HASWELL_CORE : +case INTEL_FAM6_HASWELL_ULT :case INTEL_FAM6_BROADWELL_CORE :/* BDW */ case INTEL_FAM6_SKYLAKE_MOBILE :/* SKL */ case INTEL_FAM6_CANNONLAKE_MOBILE :/* CNL */ Signature · 1 line
2.21.0
tools/power/x86/turbostat/turbostat.c +6 -4
@@ -3209,6 +3209,7 @@ int probe_nhm_msrs(unsigned int family, unsigned int model)break ;case INTEL_FAM6_HASWELL_CORE :/* HSW */ case INTEL_FAM6_HASWELL_X :/* HSX */ +case INTEL_FAM6_HASWELL_ULT :/* HSW */ case INTEL_FAM6_HASWELL_GT3E :/* HSW */ case INTEL_FAM6_BROADWELL_CORE :/* BDW */ case INTEL_FAM6_BROADWELL_GT3E :/* BDW */
@@ -3405,6 +3406,7 @@ int has_config_tdp(unsigned int family, unsigned int model)case INTEL_FAM6_IVYBRIDGE :/* IVB */ case INTEL_FAM6_HASWELL_CORE :/* HSW */ case INTEL_FAM6_HASWELL_X :/* HSX */ +case INTEL_FAM6_HASWELL_ULT :/* HSW */ case INTEL_FAM6_HASWELL_GT3E :/* HSW */ case INTEL_FAM6_BROADWELL_CORE :/* BDW */ case INTEL_FAM6_BROADWELL_GT3E :/* BDW */
@@ -3841,6 +3843,7 @@ void rapl_probe_intel(unsigned int family, unsigned int model)case INTEL_FAM6_SANDYBRIDGE :case INTEL_FAM6_IVYBRIDGE :case INTEL_FAM6_HASWELL_CORE :/* HSW */ +case INTEL_FAM6_HASWELL_ULT :/* HSW */ case INTEL_FAM6_HASWELL_GT3E :/* HSW */ case INTEL_FAM6_BROADWELL_CORE :/* BDW */ case INTEL_FAM6_BROADWELL_GT3E :/* BDW */
@@ -4032,6 +4035,7 @@ void perf_limit_reasons_probe(unsigned int family, unsigned int model)switch (model) {case INTEL_FAM6_HASWELL_CORE :/* HSW */ +case INTEL_FAM6_HASWELL_ULT :/* HSW */ case INTEL_FAM6_HASWELL_GT3E :/* HSW */ do_gfx_perf_limit_reasons =1 ;case INTEL_FAM6_HASWELL_X :/* HSX */
@@ -4251,6 +4255,7 @@ int has_snb_msrs(unsigned int family, unsigned int model)case INTEL_FAM6_IVYBRIDGE_X :/* IVB Xeon */ case INTEL_FAM6_HASWELL_CORE :/* HSW */ case INTEL_FAM6_HASWELL_X :/* HSW */ +case INTEL_FAM6_HASWELL_ULT :/* HSW */ case INTEL_FAM6_HASWELL_GT3E :/* HSW */ case INTEL_FAM6_BROADWELL_CORE :/* BDW */ case INTEL_FAM6_BROADWELL_GT3E :/* BDW */
@@ -4284,7 +4289,7 @@ int has_hsw_msrs(unsigned int family, unsigned int model)return 0 ;switch (model) { -case INTEL_FAM6_HASWELL_CORE : +case INTEL_FAM6_HASWELL_ULT :/* HSW */ case INTEL_FAM6_BROADWELL_CORE :/* BDW */ case INTEL_FAM6_SKYLAKE_MOBILE :/* SKL */ case INTEL_FAM6_CANNONLAKE_MOBILE :/* CNL */
@@ -4568,9 +4573,6 @@ unsigned int intel_model_duplicates(unsigned int model)case INTEL_FAM6_XEON_PHI_KNM :return INTEL_FAM6_XEON_PHI_KNL ; -case INTEL_FAM6_HASWELL_ULT : -return INTEL_FAM6_HASWELL_CORE ; -case INTEL_FAM6_BROADWELL_X :case INTEL_FAM6_BROADWELL_XEON_D :/* BDX-DE */ return INTEL_FAM6_BROADWELL_X ;
Quoted 10 lines · Kosuke Tatsukawa
Hi,
Quoted 7 lines
On Haswell (model
0x3C) turbostat fails withturbostat: cpu0: msr offset
0x630read failed: Input/output errorbecause Haswell Core does not have C8-C10.
Output C8-C10 only on Haswell ULT.
Quoted 9 lines
has_hsw_msrs()uses the model number returned byintel_model_duplicates(), but commitf5a4c76ad7deadded code to returnINTEL_FAM6_HASWELL_COREforINTEL_FAM6_HASWELL_ULTthere. So I think Haswell UTL also doesn't output C8-C10 with your patch.Something similar to the below patch is needed to differentiate between
INTEL_FAM6_HASWELL_COREandINTEL_FAM6_HASWELL_ULT. I don't have a Haswell-ULT machine, so I've only tested it on a Haswell-DT CPU.
Kosuke, my apologies this was in my junk folder and I just found it.
Yes. I agree with your patch below. I will resubmit. OK to add Signed-off-by from you?
P.
Quoted 90 lines
Best regards.
Quoted 22 lines
Fixes f5a4c76ad7de ("tools/power turbostat: consolidate duplicate modelnumbers")
Cc: Len Brown <[email protected]>--- tools/power/x86/turbostat/turbostat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/power/x86/turbostat/turbostat.c +1
-1@@ -4296,7 +4296,7 @@ int has_hsw_msrs(unsigned int family, unsigned int model)return 0 ;switch (model) { -case INTEL_FAM6_HASWELL_CORE : +case INTEL_FAM6_HASWELL_ULT :case INTEL_FAM6_BROADWELL_CORE :/* BDW */ case INTEL_FAM6_SKYLAKE_MOBILE :/* SKL */ case INTEL_FAM6_CANNONLAKE_MOBILE :/* CNL */ Signature · 1 line
2.21.0tools/power/x86/turbostat/turbostat.c +6
-4@@ -3209,6 +3209,7 @@ int probe_nhm_msrs(unsigned int family, unsigned int model)break ;case INTEL_FAM6_HASWELL_CORE :/* HSW */ case INTEL_FAM6_HASWELL_X :/* HSX */ +case INTEL_FAM6_HASWELL_ULT :/* HSW */ case INTEL_FAM6_HASWELL_GT3E :/* HSW */ case INTEL_FAM6_BROADWELL_CORE :/* BDW */ case INTEL_FAM6_BROADWELL_GT3E :/* BDW */ @@ -3405,6 +3406,7 @@ int has_config_tdp(unsigned int family, unsigned int model)case INTEL_FAM6_IVYBRIDGE :/* IVB */ case INTEL_FAM6_HASWELL_CORE :/* HSW */ case INTEL_FAM6_HASWELL_X :/* HSX */ +case INTEL_FAM6_HASWELL_ULT :/* HSW */ case INTEL_FAM6_HASWELL_GT3E :/* HSW */ case INTEL_FAM6_BROADWELL_CORE :/* BDW */ case INTEL_FAM6_BROADWELL_GT3E :/* BDW */ @@ -3841,6 +3843,7 @@ void rapl_probe_intel(unsigned int family, unsigned int model)case INTEL_FAM6_SANDYBRIDGE :case INTEL_FAM6_IVYBRIDGE :case INTEL_FAM6_HASWELL_CORE :/* HSW */ +case INTEL_FAM6_HASWELL_ULT :/* HSW */ case INTEL_FAM6_HASWELL_GT3E :/* HSW */ case INTEL_FAM6_BROADWELL_CORE :/* BDW */ case INTEL_FAM6_BROADWELL_GT3E :/* BDW */ @@ -4032,6 +4035,7 @@ void perf_limit_reasons_probe(unsigned int family, unsigned int model)switch (model) {case INTEL_FAM6_HASWELL_CORE :/* HSW */ +case INTEL_FAM6_HASWELL_ULT :/* HSW */ case INTEL_FAM6_HASWELL_GT3E :/* HSW */ do_gfx_perf_limit_reasons =1 ;case INTEL_FAM6_HASWELL_X :/* HSX */ @@ -4251,6 +4255,7 @@ int has_snb_msrs(unsigned int family, unsigned int model)case INTEL_FAM6_IVYBRIDGE_X :/* IVB Xeon */ case INTEL_FAM6_HASWELL_CORE :/* HSW */ case INTEL_FAM6_HASWELL_X :/* HSW */ +case INTEL_FAM6_HASWELL_ULT :/* HSW */ case INTEL_FAM6_HASWELL_GT3E :/* HSW */ case INTEL_FAM6_BROADWELL_CORE :/* BDW */ case INTEL_FAM6_BROADWELL_GT3E :/* BDW */ @@ -4284,7 +4289,7 @@ int has_hsw_msrs(unsigned int family, unsigned int model)return 0 ;switch (model) { -case INTEL_FAM6_HASWELL_CORE : +case INTEL_FAM6_HASWELL_ULT :/* HSW */ case INTEL_FAM6_BROADWELL_CORE :/* BDW */ case INTEL_FAM6_SKYLAKE_MOBILE :/* SKL */ case INTEL_FAM6_CANNONLAKE_MOBILE :/* CNL */ @@ -4568,9 +4573,6 @@ unsigned int intel_model_duplicates(unsigned int model)case INTEL_FAM6_XEON_PHI_KNM :return INTEL_FAM6_XEON_PHI_KNL ; -case INTEL_FAM6_HASWELL_ULT : -return INTEL_FAM6_HASWELL_CORE ; -case INTEL_FAM6_BROADWELL_X :case INTEL_FAM6_BROADWELL_XEON_D :/* BDX-DE */ return INTEL_FAM6_BROADWELL_X ;
Quoted 21 lines · Kosuke Tatsukawa
Quoted 10 lines
Hi,
Quoted 7 lines
On Haswell (model
0x3C) turbostat fails withturbostat: cpu0: msr offset
0x630read failed: Input/output errorbecause Haswell Core does not have C8-C10.
Output C8-C10 only on Haswell ULT.
Quoted 9 lines
has_hsw_msrs()uses the model number returned byintel_model_duplicates(), but commitf5a4c76ad7deadded code to returnINTEL_FAM6_HASWELL_COREforINTEL_FAM6_HASWELL_ULTthere. So I think Haswell UTL also doesn't output C8-C10 with your patch.Something similar to the below patch is needed to differentiate between
INTEL_FAM6_HASWELL_COREandINTEL_FAM6_HASWELL_ULT. I don't have a Haswell-ULT machine, so I've only tested it on a Haswell-DT CPU.
Quoted 4 lines
Kosuke, my apologies this was in my junk folder and I just found it.
Yes. I agree with your patch below. I will resubmit. OK to add Signed-off-by from you?
Prarit, yes, that's OK with me.
Best regards.
Quoted 85 lines
P.
Quoted 83 lines
Best regards.
Quoted 22 lines
Fixes f5a4c76ad7de ("tools/power turbostat: consolidate duplicate modelnumbers")
Cc: Len Brown <[email protected]>--- tools/power/x86/turbostat/turbostat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/power/x86/turbostat/turbostat.c +1
-1@@ -4296,7 +4296,7 @@ int has_hsw_msrs(unsigned int family, unsigned int model)return 0 ;switch (model) { -case INTEL_FAM6_HASWELL_CORE : +case INTEL_FAM6_HASWELL_ULT :case INTEL_FAM6_BROADWELL_CORE :/* BDW */ case INTEL_FAM6_SKYLAKE_MOBILE :/* SKL */ case INTEL_FAM6_CANNONLAKE_MOBILE :/* CNL */ Signature · 1 line
2.21.0tools/power/x86/turbostat/turbostat.c +6
-1@@ -3209,6 +3209,7 @@ int probe_nhm_msrs(unsigned int family, unsigned int model)break ;case INTEL_FAM6_HASWELL_CORE :/* HSW */ case INTEL_FAM6_HASWELL_X :/* HSX */ +case INTEL_FAM6_HASWELL_ULT :/* HSW */ case INTEL_FAM6_HASWELL_GT3E :/* HSW */ case INTEL_FAM6_BROADWELL_CORE :/* BDW */ case INTEL_FAM6_BROADWELL_GT3E :/* BDW */ @@ -3405,6 +3406,7 @@ int has_config_tdp(unsigned int family, unsigned int model)case INTEL_FAM6_IVYBRIDGE :/* IVB */ case INTEL_FAM6_HASWELL_CORE :/* HSW */ case INTEL_FAM6_HASWELL_X :/* HSX */ +case INTEL_FAM6_HASWELL_ULT :/* HSW */ case INTEL_FAM6_HASWELL_GT3E :/* HSW */ case INTEL_FAM6_BROADWELL_CORE :/* BDW */ case INTEL_FAM6_BROADWELL_GT3E :/* BDW */ @@ -3841,6 +3843,7 @@ void rapl_probe_intel(unsigned int family, unsigned int model)case INTEL_FAM6_SANDYBRIDGE :case INTEL_FAM6_IVYBRIDGE :case INTEL_FAM6_HASWELL_CORE :/* HSW */ +case INTEL_FAM6_HASWELL_ULT :/* HSW */ case INTEL_FAM6_HASWELL_GT3E :/* HSW */ case INTEL_FAM6_BROADWELL_CORE :/* BDW */ case INTEL_FAM6_BROADWELL_GT3E :/* BDW */ @@ -4032,6 +4035,7 @@ void perf_limit_reasons_probe(unsigned int family, unsigned int model)switch (model) {case INTEL_FAM6_HASWELL_CORE :/* HSW */ +case INTEL_FAM6_HASWELL_ULT :/* HSW */ case INTEL_FAM6_HASWELL_GT3E :/* HSW */ do_gfx_perf_limit_reasons =1 ;case INTEL_FAM6_HASWELL_X :/* HSX */ @@ -4251,6 +4255,7 @@ int has_snb_msrs(unsigned int family, unsigned int model)case INTEL_FAM6_IVYBRIDGE_X :/* IVB Xeon */ case INTEL_FAM6_HASWELL_CORE :/* HSW */ case INTEL_FAM6_HASWELL_X :/* HSW */ +case INTEL_FAM6_HASWELL_ULT :/* HSW */ case INTEL_FAM6_HASWELL_GT3E :/* HSW */ case INTEL_FAM6_BROADWELL_CORE :/* BDW */ case INTEL_FAM6_BROADWELL_GT3E :/* BDW */ @@ -4284,7 +4289,7 @@ int has_hsw_msrs(unsigned int family, unsigned int model)return 0 ;switch (model) { -case INTEL_FAM6_HASWELL_CORE : +case INTEL_FAM6_HASWELL_ULT :/* HSW */ case INTEL_FAM6_BROADWELL_CORE :/* BDW */ case INTEL_FAM6_SKYLAKE_MOBILE :/* SKL */ case INTEL_FAM6_CANNONLAKE_MOBILE :/* CNL */ @@ -4568,9 +4573,6 @@ unsigned int intel_model_duplicates(unsigned int model)case INTEL_FAM6_XEON_PHI_KNM :return INTEL_FAM6_XEON_PHI_KNL ;
Quoted 7 lines
tools/power/x86/turbostat/turbostat.c unsigned int intel_model_duplicates(unsigned int model) · line 4578
Quoted 7 lines
tools/power/x86/turbostat/turbostat.c +0
-3-case INTEL_FAM6_HASWELL_ULT : -return INTEL_FAM6_HASWELL_CORE ; -case INTEL_FAM6_BROADWELL_X :case INTEL_FAM6_BROADWELL_XEON_D :/* BDX-DE */ return INTEL_FAM6_BROADWELL_X ;
---
Kosuke TATSUKAWA | 1st Platform Software Division
| NEC Solution Innovators
| [email protected]