2022-09-24 06:05:04

by Zhang, Rui

[permalink] [raw]
Subject: [PATCH 2/3] 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.

Fixes: bcfd218b6679 ("perf/x86/rapl: Add support for Intel SPR platform")
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(-)

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


2022-10-30 08:55:48

by Zhang, Rui

[permalink] [raw]
Subject: 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

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 <[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(-)
>
> 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:


Subject: [tip: perf/urgent] perf/x86/rapl: Use standard Energy Unit for SPR Dram RAPL domain

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.

Fixes: bcfd218b6679 ("perf/x86/rapl: Add support for Intel SPR platform")
Signed-off-by: Zhang Rui <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Reviewed-by: Kan Liang <[email protected]>
Tested-by: Wang Wendy <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
---
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 fea544e..a829492 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: