[RFC PATCH 10/17] x86/resctrl: Add detailed descriptions for Clearwater Forest events
From: Tony Luck
Date: Mon Mar 03 2025 - 18:36:24 EST
There are two event groups one for energy reporting and another
for "perf" events.
See the XML description files in https://github.com/intel/Intel-PMT
in the xml/CWF/OOBMSM/{RMID-ENERGY,RMID-PERF}/ for the detailed
descriptions that were used to derive these descriptions.
Signed-off-by: Tony Luck <tony.luck@xxxxxxxxx>
---
arch/x86/kernel/cpu/resctrl/intel_pmt.c | 43 +++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/arch/x86/kernel/cpu/resctrl/intel_pmt.c b/arch/x86/kernel/cpu/resctrl/intel_pmt.c
index 76ec42a67c48..78ab6d899ee2 100644
--- a/arch/x86/kernel/cpu/resctrl/intel_pmt.c
+++ b/arch/x86/kernel/cpu/resctrl/intel_pmt.c
@@ -70,7 +70,50 @@ struct telem_entry {
struct pmt_event evts[];
};
+#define CWF_NUM_RMIDS 576
+#define CWF_ENERGY_GUID 0x26696143
+#define CWF_PERF_GUID 0x26557651
+#define CWF_ENERGY_STRIDE 0x10
+#define CWF_PERF_STRIDE 0x38
+
+static struct telem_entry cwf_energy = {
+ .name = "energy",
+ .guid = CWF_ENERGY_GUID,
+ .num_rmids = CWF_NUM_RMIDS,
+ .stride = CWF_ENERGY_STRIDE,
+ .overflow_counter_off = CWF_NUM_RMIDS * CWF_ENERGY_STRIDE,
+ .last_overflow_tstamp_off = CWF_NUM_RMIDS * CWF_ENERGY_STRIDE + 8,
+ .last_update_tstamp_off = CWF_NUM_RMIDS * CWF_ENERGY_STRIDE + 16,
+ .evts = {
+ EVT(PMT_EVENT_ENERGY, "core_energy", 0x0, EVT_U46_18),
+ EVT(PMT_EVENT_ACTIVITY, "activity", 0x8, EVT_U46_18),
+ { }
+ }
+};
+
+static struct telem_entry cwf_perf = {
+ .name = "perf",
+ .guid = CWF_PERF_GUID,
+ .num_rmids = CWF_NUM_RMIDS,
+ .stride = CWF_PERF_STRIDE,
+ .overflow_counter_off = CWF_NUM_RMIDS * CWF_PERF_STRIDE,
+ .last_overflow_tstamp_off = CWF_NUM_RMIDS * CWF_PERF_STRIDE + 8,
+ .last_update_tstamp_off = CWF_NUM_RMIDS * CWF_PERF_STRIDE + 16,
+ .evts = {
+ EVT(PMT_EVENT_STALLS_LLC_HIT, "stalls_llc_hit", 0x0, EVT_U64),
+ EVT(PMT_EVENT_C1_RES, "c1_res", 0x8, EVT_U64),
+ EVT(PMT_EVENT_UNHALTED_CORE_CYCLES, "unhalted_core_cycles", 0x10, EVT_U64),
+ EVT(PMT_EVENT_STALLS_LLC_MISS, "stalls_llc_miss", 0x18, EVT_U64),
+ EVT(PMT_EVENT_AUTO_C6_RES, "c6_res", 0x20, EVT_U64),
+ EVT(PMT_EVENT_UNHALTED_REF_CYCLES, "unhalted_ref_cycles", 0x28, EVT_U64),
+ EVT(PMT_EVENT_UOPS_RETIRED, "uops_retired", 0x30, EVT_U64),
+ { }
+ }
+};
+
static struct telem_entry *telem_entry[] = {
+ &cwf_energy,
+ &cwf_perf,
NULL
};
--
2.48.1