[PATCH tip rebase] perf/x86/intel/cstate: Add pkg C2 residency counter for Sierra Forest

Zhenyu Wang posted 1 patch 1 year, 5 months ago
There is a newer version of this series
arch/x86/events/intel/cstate.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
[PATCH tip rebase] perf/x86/intel/cstate: Add pkg C2 residency counter for Sierra Forest
Posted by Zhenyu Wang 1 year, 5 months ago
Package C2 residency counter is also available on Sierra Forest.
So add it support in srf_cstates.

Cc: Rui Zhang <rui.zhang@intel.com>
Cc: Artem Bityutskiy <artem.bityutskiy@intel.com>
Cc: Wendy Wang <wendy.wang@intel.com>
Tested-by: Wendy Wang <wendy.wang@intel.com>
Fixes: 3877d55a0db2 ("perf/x86/intel/cstate: Add Sierra Forest support")
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
---

Hi, Peter

This refresh resolved conflicts in comment against current tip tree.
Please help to apply.

Thanks!

 arch/x86/events/intel/cstate.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/x86/events/intel/cstate.c b/arch/x86/events/intel/cstate.c
index be58cfb012dd..9f116dfc4728 100644
--- a/arch/x86/events/intel/cstate.c
+++ b/arch/x86/events/intel/cstate.c
@@ -64,7 +64,7 @@
  *			       perf code: 0x00
  *			       Available model: SNB,IVB,HSW,BDW,SKL,KNL,GLM,CNL,
  *						KBL,CML,ICL,ICX,TGL,TNT,RKL,ADL,
- *						RPL,SPR,MTL,ARL,LNL
+ *						RPL,SPR,MTL,ARL,LNL,SRF
  *			       Scope: Package (physical package)
  *	MSR_PKG_C3_RESIDENCY:  Package C3 Residency Counter.
  *			       perf code: 0x01
@@ -693,7 +693,8 @@ static const struct cstate_model srf_cstates __initconst = {
 	.core_events		= BIT(PERF_CSTATE_CORE_C1_RES) |
 				  BIT(PERF_CSTATE_CORE_C6_RES),
 
-	.pkg_events		= BIT(PERF_CSTATE_PKG_C6_RES),
+	.pkg_events		= BIT(PERF_CSTATE_PKG_C2_RES) |
+				  BIT(PERF_CSTATE_PKG_C6_RES),
 
 	.module_events		= BIT(PERF_CSTATE_MODULE_C6_RES),
 };
-- 
2.45.2
Re: [PATCH tip rebase] perf/x86/intel/cstate: Add pkg C2 residency counter for Sierra Forest
Posted by Peter Zijlstra 1 year, 5 months ago
On Wed, Jul 17, 2024 at 11:16:09AM +0800, Zhenyu Wang wrote:
> Package C2 residency counter is also available on Sierra Forest.
> So add it support in srf_cstates.
> 
> Cc: Rui Zhang <rui.zhang@intel.com>
> Cc: Artem Bityutskiy <artem.bityutskiy@intel.com>
> Cc: Wendy Wang <wendy.wang@intel.com>
> Tested-by: Wendy Wang <wendy.wang@intel.com>
> Fixes: 3877d55a0db2 ("perf/x86/intel/cstate: Add Sierra Forest support")
> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
> ---
> 
> Hi, Peter
> 
> This refresh resolved conflicts in comment against current tip tree.
> Please help to apply.

Ok, I have it now. I'll try and stick it into perf/urgent once -rc1
rolls around.

> 
>  arch/x86/events/intel/cstate.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/events/intel/cstate.c b/arch/x86/events/intel/cstate.c
> index be58cfb012dd..9f116dfc4728 100644
> --- a/arch/x86/events/intel/cstate.c
> +++ b/arch/x86/events/intel/cstate.c
> @@ -64,7 +64,7 @@
>   *			       perf code: 0x00
>   *			       Available model: SNB,IVB,HSW,BDW,SKL,KNL,GLM,CNL,
>   *						KBL,CML,ICL,ICX,TGL,TNT,RKL,ADL,
> - *						RPL,SPR,MTL,ARL,LNL
> + *						RPL,SPR,MTL,ARL,LNL,SRF
>   *			       Scope: Package (physical package)
>   *	MSR_PKG_C3_RESIDENCY:  Package C3 Residency Counter.
>   *			       perf code: 0x01
> @@ -693,7 +693,8 @@ static const struct cstate_model srf_cstates __initconst = {
>  	.core_events		= BIT(PERF_CSTATE_CORE_C1_RES) |
>  				  BIT(PERF_CSTATE_CORE_C6_RES),
>  
> -	.pkg_events		= BIT(PERF_CSTATE_PKG_C6_RES),
> +	.pkg_events		= BIT(PERF_CSTATE_PKG_C2_RES) |
> +				  BIT(PERF_CSTATE_PKG_C6_RES),
>  
>  	.module_events		= BIT(PERF_CSTATE_MODULE_C6_RES),
>  };
> -- 
> 2.45.2
>
Re: [PATCH tip rebase] perf/x86/intel/cstate: Add pkg C2 residency counter for Sierra Forest
Posted by Liang, Kan 1 year, 5 months ago

On 2024-07-16 11:16 p.m., Zhenyu Wang wrote:
> Package C2 residency counter is also available on Sierra Forest.
> So add it support in srf_cstates.
> 
> Cc: Rui Zhang <rui.zhang@intel.com>
> Cc: Artem Bityutskiy <artem.bityutskiy@intel.com>
> Cc: Wendy Wang <wendy.wang@intel.com>
> Tested-by: Wendy Wang <wendy.wang@intel.com>
> Fixes: 3877d55a0db2 ("perf/x86/intel/cstate: Add Sierra Forest support")
> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>

Reviewed-by: Kan Liang <kan.liang@linux.intel.com>

Thanks,
Kan

> ---
> 
> Hi, Peter
> 
> This refresh resolved conflicts in comment against current tip tree.
> Please help to apply.
> 
> Thanks!
> 
>  arch/x86/events/intel/cstate.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/events/intel/cstate.c b/arch/x86/events/intel/cstate.c
> index be58cfb012dd..9f116dfc4728 100644
> --- a/arch/x86/events/intel/cstate.c
> +++ b/arch/x86/events/intel/cstate.c
> @@ -64,7 +64,7 @@
>   *			       perf code: 0x00
>   *			       Available model: SNB,IVB,HSW,BDW,SKL,KNL,GLM,CNL,
>   *						KBL,CML,ICL,ICX,TGL,TNT,RKL,ADL,
> - *						RPL,SPR,MTL,ARL,LNL
> + *						RPL,SPR,MTL,ARL,LNL,SRF
>   *			       Scope: Package (physical package)
>   *	MSR_PKG_C3_RESIDENCY:  Package C3 Residency Counter.
>   *			       perf code: 0x01
> @@ -693,7 +693,8 @@ static const struct cstate_model srf_cstates __initconst = {
>  	.core_events		= BIT(PERF_CSTATE_CORE_C1_RES) |
>  				  BIT(PERF_CSTATE_CORE_C6_RES),
>  
> -	.pkg_events		= BIT(PERF_CSTATE_PKG_C6_RES),
> +	.pkg_events		= BIT(PERF_CSTATE_PKG_C2_RES) |
> +				  BIT(PERF_CSTATE_PKG_C6_RES),
>  
>  	.module_events		= BIT(PERF_CSTATE_MODULE_C6_RES),
>  };
[tip: perf/core] perf/x86/intel/cstate: Add pkg C2 residency counter for Sierra Forest
Posted by tip-bot2 for Zhenyu Wang 1 year, 4 months ago
The following commit has been merged into the perf/core branch of tip:

Commit-ID:     b1d0e15c8725d21a73c22c099418a63940261041
Gitweb:        https://git.kernel.org/tip/b1d0e15c8725d21a73c22c099418a63940261041
Author:        Zhenyu Wang <zhenyuw@linux.intel.com>
AuthorDate:    Wed, 17 Jul 2024 11:16:09 +08:00
Committer:     Peter Zijlstra <peterz@infradead.org>
CommitterDate: Mon, 29 Jul 2024 12:16:22 +02:00

perf/x86/intel/cstate: Add pkg C2 residency counter for Sierra Forest

Package C2 residency counter is also available on Sierra Forest.
So add it support in srf_cstates.

Fixes: 3877d55a0db2 ("perf/x86/intel/cstate: Add Sierra Forest support")
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
Tested-by: Wendy Wang <wendy.wang@intel.com>
Link: https://lore.kernel.org/r/20240717031609.74513-1-zhenyuw@linux.intel.com
---
 arch/x86/events/intel/cstate.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/x86/events/intel/cstate.c b/arch/x86/events/intel/cstate.c
index be58cfb..9f116df 100644
--- a/arch/x86/events/intel/cstate.c
+++ b/arch/x86/events/intel/cstate.c
@@ -64,7 +64,7 @@
  *			       perf code: 0x00
  *			       Available model: SNB,IVB,HSW,BDW,SKL,KNL,GLM,CNL,
  *						KBL,CML,ICL,ICX,TGL,TNT,RKL,ADL,
- *						RPL,SPR,MTL,ARL,LNL
+ *						RPL,SPR,MTL,ARL,LNL,SRF
  *			       Scope: Package (physical package)
  *	MSR_PKG_C3_RESIDENCY:  Package C3 Residency Counter.
  *			       perf code: 0x01
@@ -693,7 +693,8 @@ static const struct cstate_model srf_cstates __initconst = {
 	.core_events		= BIT(PERF_CSTATE_CORE_C1_RES) |
 				  BIT(PERF_CSTATE_CORE_C6_RES),
 
-	.pkg_events		= BIT(PERF_CSTATE_PKG_C6_RES),
+	.pkg_events		= BIT(PERF_CSTATE_PKG_C2_RES) |
+				  BIT(PERF_CSTATE_PKG_C6_RES),
 
 	.module_events		= BIT(PERF_CSTATE_MODULE_C6_RES),
 };