[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250321231609.57418-10-tony.luck@intel.com>
Date: Fri, 21 Mar 2025 16:15:59 -0700
From: Tony Luck <tony.luck@...el.com>
To: Fenghua Yu <fenghuay@...dia.com>,
Reinette Chatre <reinette.chatre@...el.com>,
Maciej Wieczor-Retman <maciej.wieczor-retman@...el.com>,
Peter Newman <peternewman@...gle.com>,
James Morse <james.morse@....com>,
Babu Moger <babu.moger@....com>,
Drew Fustini <dfustini@...libre.com>,
Dave Martin <Dave.Martin@....com>
Cc: linux-kernel@...r.kernel.org,
patches@...ts.linux.dev,
Tony Luck <tony.luck@...el.com>
Subject: [PATCH v2 09/16] x86/resctrl: Add detailed descriptions for Clearwater Forest events
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@...el.com>
---
arch/x86/kernel/cpu/resctrl/intel_aet.c | 54 +++++++++++++++++++++++++
1 file changed, 54 insertions(+)
diff --git a/arch/x86/kernel/cpu/resctrl/intel_aet.c b/arch/x86/kernel/cpu/resctrl/intel_aet.c
index 9a8ccb62b4ab..67862e81b9e0 100644
--- a/arch/x86/kernel/cpu/resctrl/intel_aet.c
+++ b/arch/x86/kernel/cpu/resctrl/intel_aet.c
@@ -94,8 +94,62 @@ struct telem_entry {
struct pmt_event evts[];
};
+/*
+ * Known events from Intel Clearwater Forest CPU.
+ */
+#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
+
+/*
+ * https://github.com/intel/Intel-PMT
+ * xml/CWF/OOBMSM/RMID-ENERGY *.xml
+ */
+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),
+ { }
+ }
+};
+
+/*
+ * https://github.com/intel/Intel-PMT
+ * xml/CWF/OOBMSM/RMID-PERF *.xml
+ */
+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),
+ { }
+ }
+};
+
/* All known telemetry event groups */
static struct telem_entry *telem_entry[] = {
+ &cwf_energy,
+ &cwf_perf,
NULL
};
--
2.48.1
Powered by blists - more mailing lists