* [PATCH 0/3] driver/tool fix for SPR Dram RAPL Domain
@ 2022-09-24 5:47 Zhang Rui
2022-09-24 5:47 ` [PATCH 1/3] powercap: intel_rapl: Use standard Energy Unit for SPR Dram RAPL domain Zhang Rui
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Zhang Rui @ 2022-09-24 5:47 UTC (permalink / raw)
To: peterz, rjw, len.brown
Cc: mingo, linux-pm, x86, linux-perf-users, linux-kernel, ak,
kan.liang, artem.bityutskiy
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/3] powercap: intel_rapl: Use standard Energy Unit for SPR Dram RAPL domain
2022-09-24 5:47 [PATCH 0/3] driver/tool fix for SPR Dram RAPL Domain Zhang Rui
@ 2022-09-24 5:47 ` Zhang Rui
2022-09-24 17:34 ` Rafael J. Wysocki
2022-09-24 5:47 ` [PATCH 2/3] perf/x86/rapl: " Zhang Rui
2022-09-24 5:47 ` [PATCH 3/3] tools/power turbostat: " Zhang Rui
2 siblings, 1 reply; 6+ messages in thread
From: Zhang Rui @ 2022-09-24 5:47 UTC (permalink / raw)
To: peterz, rjw, len.brown
Cc: mingo, linux-pm, x86, linux-perf-users, linux-kernel, ak,
kan.liang, artem.bityutskiy
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.
Fixes: 2d798d9f5967 ("powercap: intel_rapl: add support for Sapphire Rapids")
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Tested-by: Wang Wendy <wendy.wang@intel.com>
---
drivers/powercap/intel_rapl_common.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/powercap/intel_rapl_common.c b/drivers/powercap/intel_rapl_common.c
index 949eb90f5733..d8eaa04bf2af 100644
--- a/drivers/powercap/intel_rapl_common.c
+++ b/drivers/powercap/intel_rapl_common.c
@@ -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,
};
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] perf/x86/rapl: Use standard Energy Unit for SPR Dram RAPL domain
2022-09-24 5:47 [PATCH 0/3] driver/tool fix for SPR Dram RAPL Domain Zhang Rui
2022-09-24 5:47 ` [PATCH 1/3] powercap: intel_rapl: Use standard Energy Unit for SPR Dram RAPL domain Zhang Rui
@ 2022-09-24 5:47 ` Zhang Rui
2022-10-30 8:31 ` Zhang Rui
2022-09-24 5:47 ` [PATCH 3/3] tools/power turbostat: " Zhang Rui
2 siblings, 1 reply; 6+ messages in thread
From: Zhang Rui @ 2022-09-24 5:47 UTC (permalink / raw)
To: peterz, rjw, len.brown
Cc: mingo, linux-pm, x86, linux-perf-users, linux-kernel, ak,
kan.liang, artem.bityutskiy
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 SPR platform")
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Tested-by: Wang Wendy <wendy.wang@intel.com>
Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
---
arch/x86/events/rapl.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/arch/x86/events/rapl.c b/arch/x86/events/rapl.c
index 77e3a47af5ad..7d8db681880d 100644
--- a/arch/x86/events/rapl.c
+++ b/arch/x86/events/rapl.c
@@ -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:
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] tools/power turbostat: Use standard Energy Unit for SPR Dram RAPL domain
2022-09-24 5:47 [PATCH 0/3] driver/tool fix for SPR Dram RAPL Domain Zhang Rui
2022-09-24 5:47 ` [PATCH 1/3] powercap: intel_rapl: Use standard Energy Unit for SPR Dram RAPL domain Zhang Rui
2022-09-24 5:47 ` [PATCH 2/3] perf/x86/rapl: " Zhang Rui
@ 2022-09-24 5:47 ` Zhang Rui
2 siblings, 0 replies; 6+ messages in thread
From: Zhang Rui @ 2022-09-24 5:47 UTC (permalink / raw)
To: peterz, rjw, len.brown
Cc: mingo, linux-pm, x86, linux-perf-users, linux-kernel, ak,
kan.liang, artem.bityutskiy
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 rapl_dram_energy_units quirk.
Fixes: e7af1ed3fa47 ("tools/power turbostat: Support additional CPU model numbers")
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Tested-by: Wang Wendy <wendy.wang@intel.com>
---
tools/power/x86/turbostat/turbostat.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index 597cc2dbc456..e3e357df2a51 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -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);
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/3] powercap: intel_rapl: Use standard Energy Unit for SPR Dram RAPL domain
2022-09-24 5:47 ` [PATCH 1/3] powercap: intel_rapl: Use standard Energy Unit for SPR Dram RAPL domain Zhang Rui
@ 2022-09-24 17:34 ` Rafael J. Wysocki
0 siblings, 0 replies; 6+ messages in thread
From: Rafael J. Wysocki @ 2022-09-24 17:34 UTC (permalink / raw)
To: Zhang Rui
Cc: Peter Zijlstra, Rafael J. Wysocki, Len Brown, Ingo Molnar,
Linux PM, the arch/x86 maintainers, linux-perf-users,
Linux Kernel Mailing List, Andi Kleen, Kan Liang,
Artem Bityutskiy
On Sat, Sep 24, 2022 at 7:45 AM Zhang Rui <rui.zhang@intel.com> wrote:
>
> 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.
>
> Fixes: 2d798d9f5967 ("powercap: intel_rapl: add support for Sapphire Rapids")
> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
> Tested-by: Wang Wendy <wendy.wang@intel.com>
> ---
> drivers/powercap/intel_rapl_common.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/powercap/intel_rapl_common.c b/drivers/powercap/intel_rapl_common.c
> index 949eb90f5733..d8eaa04bf2af 100644
> --- a/drivers/powercap/intel_rapl_common.c
> +++ b/drivers/powercap/intel_rapl_common.c
> @@ -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!
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/3] perf/x86/rapl: Use standard Energy Unit for SPR Dram RAPL domain
2022-09-24 5:47 ` [PATCH 2/3] perf/x86/rapl: " Zhang Rui
@ 2022-10-30 8:31 ` Zhang Rui
0 siblings, 0 replies; 6+ messages in thread
From: Zhang Rui @ 2022-10-30 8:31 UTC (permalink / raw)
To: peterz, rjw, len.brown
Cc: mingo, linux-pm, x86, linux-perf-users, linux-kernel, ak,
kan.liang, artem.bityutskiy
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
On Sat, 2022-09-24 at 13:47 +0800, Zhang Rui wrote:
> 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 SPR
> platform")
> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
> Tested-by: Wang Wendy <wendy.wang@intel.com>
> Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
> ---
> arch/x86/events/rapl.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/arch/x86/events/rapl.c b/arch/x86/events/rapl.c
> index 77e3a47af5ad..7d8db681880d 100644
> --- a/arch/x86/events/rapl.c
> +++ b/arch/x86/events/rapl.c
> @@ -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:
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-10-30 8:31 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-24 5:47 [PATCH 0/3] driver/tool fix for SPR Dram RAPL Domain Zhang Rui
2022-09-24 5:47 ` [PATCH 1/3] powercap: intel_rapl: Use standard Energy Unit for SPR Dram RAPL domain Zhang Rui
2022-09-24 17:34 ` Rafael J. Wysocki
2022-09-24 5:47 ` [PATCH 2/3] perf/x86/rapl: " Zhang Rui
2022-10-30 8:31 ` Zhang Rui
2022-09-24 5:47 ` [PATCH 3/3] tools/power turbostat: " Zhang Rui
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).