[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <SA1PR11MB84900A6023E6F9856A928A779FEC2@SA1PR11MB8490.namprd11.prod.outlook.com>
Date: Wed, 15 May 2024 13:01:36 +0000
From: "Wang, Wendy" <wendy.wang@...el.com>
To: Zhenyu Wang <zhenyuw@...ux.intel.com>, "peterz@...radead.org"
<peterz@...radead.org>
CC: "kan.liang@...ux.intel.com" <kan.liang@...ux.intel.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-perf-users@...r.kernel.org" <linux-perf-users@...r.kernel.org>,
"x86@...nel.org" <x86@...nel.org>, "Zhang, Rui" <rui.zhang@...el.com>,
"Bityutskiy, Artem" <artem.bityutskiy@...el.com>, "Wang, Wendy"
<wendy.wang@...el.com>
Subject: RE: [PATCH RESEND] perf/x86/intel/cstate: Add pkg C2 residency
counter for Sierra Forest
Verified on SRF-SP, the Perf PC2 counter is updated:
[root@...rf07 ~]# perf stat --per-socket -e cstate_pkg/c2-residency/ sleep 20
Performance counter stats for 'system wide':
S0 1 9,589,297,024 cstate_pkg/c2-residency/
S1 1 10,204,349,952 cstate_pkg/c2-residency/
20.003533150 seconds time elapsed
[root@...rf07 ~]# perf stat --per-socket -e cstate_pkg/c2-residency/ sleep 20
Performance counter stats for 'system wide':
S0 1 9,309,806,784 cstate_pkg/c2-residency/
S1 1 10,897,684,928 cstate_pkg/c2-residency/
20.004747926 seconds time elapsed
Tested-by: Wendy Wang <wendy.wang@...el.com>
-----Original Message-----
From: Zhenyu Wang <zhenyuw@...ux.intel.com>
Sent: Wednesday, May 15, 2024 11:22 AM
To: peterz@...radead.org
Cc: kan.liang@...ux.intel.com; linux-kernel@...r.kernel.org; linux-perf-users@...r.kernel.org; x86@...nel.org; Zhang, Rui <rui.zhang@...el.com>; Bityutskiy, Artem <artem.bityutskiy@...el.com>; Wang, Wendy <wendy.wang@...el.com>
Subject: [PATCH RESEND] 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.
Cc: Rui Zhang <rui.zhang@...el.com>
Cc: Artem Bityutskiy <artem.bityutskiy@...el.com>
Cc: Wendy Wang <wendy.wang@...el.com>
Fixes: 3877d55a0db2 ("perf/x86/intel/cstate: Add Sierra Forest support")
Signed-off-by: Zhenyu Wang <zhenyuw@...ux.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 e64eaa8dda5a..4cd36848cfff 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
+ * RPL,SPR,MTL,SRF
* Scope: Package (physical package)
* MSR_PKG_C3_RESIDENCY: Package C3 Residency Counter.
* perf code: 0x01
@@ -683,7 +683,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.43.0
Powered by blists - more mailing lists