driver/tool fix for SPR Dram RAPL Domain
Subsystems (4)
cover driver/tool fix for SPR Dram RAPL Domain
Intel Xeon servers used to use a fixed energy resolution (15.3uj) for Dram RAPL domain, starting from HasWell-X.
But on SPR, this changes.
The Dram RAPL domain uses 61uj energy resolution, which follows the standard energy resolution as described in MSR_RAPL_POWER_UNIT.
There are a couple of places that have implemented the energy unit quirk for SPR Dram RAPL domain, including intel-rapl driver, rapl perf pmu and the turbostat tool.
This patch series fixes them all, although they belong to different components.
thanks,
rui
PATCH 1/3 powercap: intel_rapl: Use standard Energy Unit for SPR Dram RAPL domain
Intel Xeon servers used to use a fixed energy resolution (15.3uj) for Dram RAPL domain. But on SPR, Dram RAPL domain follows the standard energy resolution as described in MSR_RAPL_POWER_UNIT.
Remove the SPR dram_domain_energy_unit quirk.
--- drivers/powercap/intel_rapl_common.c | 1 - 1 file changed, 1 deletion(-)
drivers/powercap/intel_rapl_common.c +0 -1
@@ -1035,7 +1035,6 @@ static const struct rapl_defaults rapl_defaults_spr_server = { .check_unit = rapl_check_unit_core, .set_floor_freq = set_floor_freq_default, .compute_time_window = rapl_compute_time_window_core, - .dram_domain_energy_unit = 15300, .psys_domain_energy_unit = 1000000000, .spr_psys_bits = true, };
Signature · 1 line
2.25.1
Re: [PATCH 1/3] powercap: intel_rapl: Use standard Energy Unit for SPR Dram RAPL domain
Quoted 19 lines · Zhang Rui
Intel Xeon servers used to use a fixed energy resolution (15.3uj) for Dram RAPL domain. But on SPR, Dram RAPL domain follows the standard energy resolution as described in
MSR_RAPL_POWER_UNIT.Remove the SPR
dram_domain_energy_unitquirk.Fixes 2d798d9f5967 ("powercap: intel_rapl: add support for Sapphire Rapids")Signed-off-by Zhang Rui <[email protected]>Tested-by Wang Wendy <[email protected]>--- drivers/powercap/intel_rapl_common.c | 1 - 1 file changed, 1 deletion(-)drivers/powercap/intel_rapl_common.c +0
-0
drivers/powercap/intel_rapl_common.c static const struct rapl_defaults rapl_defaults_spr_server = {
Quoted 8 lines
drivers/powercap/intel_rapl_common.c +0
-2@@ -1035,7 +1035,6 @@ static const struct rapl_defaults rapl_defaults_spr_server = { .check_unit = rapl_check_unit_core, .set_floor_freq = set_floor_freq_default, .compute_time_window = rapl_compute_time_window_core, - .dram_domain_energy_unit = 15300, .psys_domain_energy_unit = 1000000000, .spr_psys_bits = true, }; --
Applied as 6.1 material, thanks!
PATCH 2/3 perf/x86/rapl: Use standard Energy Unit for SPR Dram RAPL domain
In reply to Zhang RuiIntel Xeon servers used to use a fixed energy resolution (15.3uj) for Dram RAPL domain. But on SPR, Dram RAPL domain follows the standard energy resolution as described in MSR_RAPL_POWER_UNIT.
Remove the SPR Dram energy unit quirk.
--- arch/x86/events/rapl.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
arch/x86/events/rapl.c +1 -5
@@ -619,12 +619,8 @@ static int rapl_check_hw_unit(struct rapl_model *rm)case RAPL_UNIT_QUIRK_INTEL_HSW : rapl_hw_unit[PERF_RAPL_RAM ] =16 ;break ; -/* -* SPR shares the same DRAM domain energy unit as HSW, plus it -* also has a fixed energy unit for Psys domain. -*/ +/* SPR uses a fixed energy unit for Psys domain. */ case RAPL_UNIT_QUIRK_INTEL_SPR : - rapl_hw_unit[PERF_RAPL_RAM ] =16 ; rapl_hw_unit[PERF_RAPL_PSYS ] =0 ;break ;default :
Signature · 1 line
2.25.1
Re: [PATCH 2/3] perf/x86/rapl: Use standard Energy Unit for SPR Dram RAPL domain
Hi, Peter,
Can you please consider this as tip material?
This patch series does not get merged altogether. The intel-rapl and turbostat fixes have been merged by Rafael and Len respectively.
thanks,
rui
Quoted 34 lines · Zhang Rui
Intel Xeon servers used to use a fixed energy resolution (15.3uj) for Dram RAPL domain. But on SPR, Dram RAPL domain follows the standard energy resolution as described in
MSR_RAPL_POWER_UNIT.Remove the SPR Dram energy unit quirk.
Fixes bcfd218b6679 ("perf/x86/rapl: Add support for Intel SPRplatform")
Signed-off-by Zhang Rui <[email protected]>Tested-by Wang Wendy <[email protected]>Reviewed-by Kan Liang <[email protected]>--- arch/x86/events/rapl.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)arch/x86/events/rapl.c +1
-5@@ -619,12 +619,8 @@ static int rapl_check_hw_unit(struct rapl_model *rm)case RAPL_UNIT_QUIRK_INTEL_HSW : rapl_hw_unit[PERF_RAPL_RAM ] =16 ;break ; -/* -* SPR shares the same DRAM domain energy unit as HSW, plus it -* also has a fixed energy unit for Psys domain. -*/ +/* SPR uses a fixed energy unit for Psys domain. */ case RAPL_UNIT_QUIRK_INTEL_SPR : - rapl_hw_unit[PERF_RAPL_RAM ] =16 ; rapl_hw_unit[PERF_RAPL_PSYS ] =0 ;break ;default:
[tip: perf/urgent] perf/x86/rapl: Use standard Energy Unit for SPR Dram RAPL domain
In reply to Zhang RuiThe following commit has been merged into the perf/urgent branch of tip:
The following commit has been merged into the perf/urgent branch of tip:
Commit-ID: 80275ca9e525c198c7efe045c4a6cdb68a2ea763 Gitweb: https://git.kernel.org/tip/80275ca9e525c198c7efe045c4a6cdb68a2ea763 Author: Zhang Rui <[email protected]> AuthorDate: Sat, 24 Sep 2022 13:47:37 +08:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Wed, 02 Nov 2022 12:22:05 +01:00
perf/x86/rapl: Use standard Energy Unit for SPR Dram RAPL domain
Intel Xeon servers used to use a fixed energy resolution (15.3uj) for Dram RAPL domain. But on SPR, Dram RAPL domain follows the standard energy resolution as described in MSR_RAPL_POWER_UNIT.
Remove the SPR Dram energy unit quirk.
--- arch/x86/events/rapl.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
arch/x86/events/rapl.c +1 -5
@@ -619,12 +619,8 @@ static int rapl_check_hw_unit(struct rapl_model *rm)case RAPL_UNIT_QUIRK_INTEL_HSW : rapl_hw_unit[PERF_RAPL_RAM ] =16 ;break ; -/* -* SPR shares the same DRAM domain energy unit as HSW, plus it -* also has a fixed energy unit for Psys domain. -*/ +/* SPR uses a fixed energy unit for Psys domain. */ case RAPL_UNIT_QUIRK_INTEL_SPR : - rapl_hw_unit[PERF_RAPL_RAM ] =16 ; rapl_hw_unit[PERF_RAPL_PSYS ] =0 ;break ;default :
PATCH 3/3 tools/power turbostat: Use standard Energy Unit for SPR Dram RAPL domain
In reply to Zhang RuiIntel Xeon servers used to use a fixed energy resolution (15.3uj) for Dram RAPL domain. But on SPR, Dram RAPL domain follows the standard energy resolution as described in MSR_RAPL_POWER_UNIT.
Remove the SPR rapl_dram_energy_units quirk.
--- tools/power/x86/turbostat/turbostat.c | 1 - 1 file changed, 1 deletion(-)
tools/power/x86/turbostat/turbostat.c +0 -1
@@ -4560,7 +4560,6 @@ static double rapl_dram_energy_units_probe(int model, double rapl_energy_units)case INTEL_FAM6_SKYLAKE_X :/* SKX */ case INTEL_FAM6_XEON_PHI_KNL :/* KNL */ case INTEL_FAM6_ICELAKE_X :/* ICX */ -case INTEL_FAM6_SAPPHIRERAPIDS_X :/* SPR */ return (rapl_dram_energy_units =15.3 /1000000 );default :return (rapl_energy_units);
Signature · 1 line
2.25.1