* [PATCH v4] x86,fs/resctrl: Add event group descriptions for Intel Diamond Rapids
@ 2026-09-30 17:15 Tony Luck
2026-10-01 6:01 ` [tip: x86/cache] " tip-bot2 for Tony Luck
0 siblings, 1 reply; 2+ messages in thread
From: Tony Luck @ 2026-09-30 17:15 UTC (permalink / raw)
To: Fenghua Yu, Reinette Chatre, Maciej Wieczor-Retman, Peter Newman,
James Morse, Babu Moger, Drew Fustini, Dave Martin, Chen Yu
Cc: x86, linux-kernel, patches, Tony Luck
Intel Diamond Rapids exposes Application Energy Telemetry through two
new PMT aggregator GUIDs: one covering the "energy" feature, and one
covering the "perf" feature, both documented in the Intel-PMT XML
repository [1].
The "perf" aggregator references two events not previously enumerated
by resctrl: retired instructions (INST_RETIRED), and a count of
unhalted core clock cycles perceived by hardware as contributing to
instruction execution (PCNT).
Add definitions for both aggregators, and add the two new events to
the resctrl filesystem so they can be exposed to user space.
Signed-off-by: Tony Luck <tony.luck@intel.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Link: https://github.com/intel/Intel-PMT # [1]
---
v4:
Fix the place where I missed s/A/a/
Did a test build this time!
---
include/linux/resctrl_types.h | 2 ++
arch/x86/kernel/cpu/resctrl/intel_aet.c | 34 +++++++++++++++++++++++++
fs/resctrl/monitor.c | 2 ++
3 files changed, 38 insertions(+)
diff --git a/include/linux/resctrl_types.h b/include/linux/resctrl_types.h
index a5f56faa18d2..e2e2cf3d9ff6 100644
--- a/include/linux/resctrl_types.h
+++ b/include/linux/resctrl_types.h
@@ -60,6 +60,8 @@ enum resctrl_event_id {
PMT_EVENT_AUTO_C6_RES,
PMT_EVENT_UNHALTED_REF_CYCLES,
PMT_EVENT_UOPS_RETIRED,
+ PMT_EVENT_INST_RETIRED,
+ PMT_EVENT_PCNT,
/* Must be the last */
QOS_NUM_EVENTS,
diff --git a/arch/x86/kernel/cpu/resctrl/intel_aet.c b/arch/x86/kernel/cpu/resctrl/intel_aet.c
index c22c3cf5167d..66cd8c2c7a51 100644
--- a/arch/x86/kernel/cpu/resctrl/intel_aet.c
+++ b/arch/x86/kernel/cpu/resctrl/intel_aet.c
@@ -125,9 +125,43 @@ static struct event_group perf_0x26557651 = {
}
};
+/*
+ * Link: https://github.com/intel/Intel-PMT/blob/main/xml/DMR/OOBMSM/RMID-ENERGY/dmr_aggregator.xml
+ */
+static struct event_group energy_0x47903099 = {
+ .pfname = "energy",
+ .guid = 0x47903099,
+ .num_rmid = 256,
+ .mmio_size = XML_MMIO_SIZE(256, 2, 3),
+ .num_events = 2,
+ .evts = {
+ EVT(PMT_EVENT_ENERGY, 0, 18),
+ EVT(PMT_EVENT_ACTIVITY, 1, 18),
+ }
+};
+
+/*
+ * Link: https://github.com/intel/Intel-PMT/blob/main/xml/DMR/OOBMSM/RMID-PERF/dmr_aggregator.xml
+ */
+static struct event_group perf_0x1415910a = {
+ .pfname = "perf",
+ .guid = 0x1415910a,
+ .num_rmid = 256,
+ .mmio_size = XML_MMIO_SIZE(256, 4, 3),
+ .num_events = 4,
+ .evts = {
+ EVT(PMT_EVENT_UNHALTED_REF_CYCLES, 0, 0),
+ EVT(PMT_EVENT_UNHALTED_CORE_CYCLES, 1, 0),
+ EVT(PMT_EVENT_INST_RETIRED, 2, 0),
+ EVT(PMT_EVENT_PCNT, 3, 0),
+ }
+};
+
static struct event_group *known_event_groups[] = {
&energy_0x26696143,
+ &energy_0x47903099,
&perf_0x26557651,
+ &perf_0x1415910a,
};
#define for_each_event_group(_peg) \
diff --git a/fs/resctrl/monitor.c b/fs/resctrl/monitor.c
index 73413cb128ea..04e4ea612b7c 100644
--- a/fs/resctrl/monitor.c
+++ b/fs/resctrl/monitor.c
@@ -1041,6 +1041,8 @@ struct mon_evt mon_event_all[QOS_NUM_EVENTS] = {
MON_EVENT(PMT_EVENT_AUTO_C6_RES, "c6_res", RDT_RESOURCE_PERF_PKG, false),
MON_EVENT(PMT_EVENT_UNHALTED_REF_CYCLES, "unhalted_ref_cycles", RDT_RESOURCE_PERF_PKG, false),
MON_EVENT(PMT_EVENT_UOPS_RETIRED, "uops_retired", RDT_RESOURCE_PERF_PKG, false),
+ MON_EVENT(PMT_EVENT_INST_RETIRED, "inst_retired", RDT_RESOURCE_PERF_PKG, false),
+ MON_EVENT(PMT_EVENT_PCNT, "pcnt", RDT_RESOURCE_PERF_PKG, false),
};
bool resctrl_enable_mon_event(enum resctrl_event_id eventid, bool any_cpu,
--
2.55.0
^ permalink raw reply [flat|nested] 2+ messages in thread* [tip: x86/cache] x86,fs/resctrl: Add event group descriptions for Intel Diamond Rapids
2026-09-30 17:15 [PATCH v4] x86,fs/resctrl: Add event group descriptions for Intel Diamond Rapids Tony Luck
@ 2026-10-01 6:01 ` tip-bot2 for Tony Luck
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Tony Luck @ 2026-10-01 6:01 UTC (permalink / raw)
To: linux-tip-commits
Cc: Tony Luck, Borislav Petkov (AMD), Reinette Chatre, x86, linux-kernel
The following commit has been merged into the x86/cache branch of tip:
Commit-ID: 50e5282df427830fcd810e553f0e355d9cccb3e2
Gitweb: https://git.kernel.org/tip/50e5282df427830fcd810e553f0e355d9cccb3e2
Author: Tony Luck <tony.luck@intel.com>
AuthorDate: Wed, 30 Sep 2026 10:15:54 -07:00
Committer: Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Wed, 30 Sep 2026 22:47:08 -07:00
x86,fs/resctrl: Add event group descriptions for Intel Diamond Rapids
Intel Diamond Rapids exposes Application Energy Telemetry through two new PMT
aggregator GUIDs: one covering the "energy" feature, and one covering the
"perf" feature, both documented in the Intel-PMT XML repository at
https://github.com/intel/Intel-PMT
The "perf" aggregator references two events not previously enumerated by
resctrl: retired instructions (INST_RETIRED), and a count of unhalted core
clock cycles perceived by hardware as contributing to instruction execution
(PCNT).
Add definitions for both aggregators, and add the two new events to the
resctrl filesystem so they can be exposed to user space.
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Link: https://patch.msgid.link/20260930171554.12794-1-tony.luck@intel.com
---
arch/x86/kernel/cpu/resctrl/intel_aet.c | 34 ++++++++++++++++++++++++-
fs/resctrl/monitor.c | 2 +-
include/linux/resctrl_types.h | 2 +-
3 files changed, 38 insertions(+)
diff --git a/arch/x86/kernel/cpu/resctrl/intel_aet.c b/arch/x86/kernel/cpu/resctrl/intel_aet.c
index c22c3cf..66cd8c2 100644
--- a/arch/x86/kernel/cpu/resctrl/intel_aet.c
+++ b/arch/x86/kernel/cpu/resctrl/intel_aet.c
@@ -125,9 +125,43 @@ static struct event_group perf_0x26557651 = {
}
};
+/*
+ * Link: https://github.com/intel/Intel-PMT/blob/main/xml/DMR/OOBMSM/RMID-ENERGY/dmr_aggregator.xml
+ */
+static struct event_group energy_0x47903099 = {
+ .pfname = "energy",
+ .guid = 0x47903099,
+ .num_rmid = 256,
+ .mmio_size = XML_MMIO_SIZE(256, 2, 3),
+ .num_events = 2,
+ .evts = {
+ EVT(PMT_EVENT_ENERGY, 0, 18),
+ EVT(PMT_EVENT_ACTIVITY, 1, 18),
+ }
+};
+
+/*
+ * Link: https://github.com/intel/Intel-PMT/blob/main/xml/DMR/OOBMSM/RMID-PERF/dmr_aggregator.xml
+ */
+static struct event_group perf_0x1415910a = {
+ .pfname = "perf",
+ .guid = 0x1415910a,
+ .num_rmid = 256,
+ .mmio_size = XML_MMIO_SIZE(256, 4, 3),
+ .num_events = 4,
+ .evts = {
+ EVT(PMT_EVENT_UNHALTED_REF_CYCLES, 0, 0),
+ EVT(PMT_EVENT_UNHALTED_CORE_CYCLES, 1, 0),
+ EVT(PMT_EVENT_INST_RETIRED, 2, 0),
+ EVT(PMT_EVENT_PCNT, 3, 0),
+ }
+};
+
static struct event_group *known_event_groups[] = {
&energy_0x26696143,
+ &energy_0x47903099,
&perf_0x26557651,
+ &perf_0x1415910a,
};
#define for_each_event_group(_peg) \
diff --git a/fs/resctrl/monitor.c b/fs/resctrl/monitor.c
index 73413cb..04e4ea6 100644
--- a/fs/resctrl/monitor.c
+++ b/fs/resctrl/monitor.c
@@ -1041,6 +1041,8 @@ struct mon_evt mon_event_all[QOS_NUM_EVENTS] = {
MON_EVENT(PMT_EVENT_AUTO_C6_RES, "c6_res", RDT_RESOURCE_PERF_PKG, false),
MON_EVENT(PMT_EVENT_UNHALTED_REF_CYCLES, "unhalted_ref_cycles", RDT_RESOURCE_PERF_PKG, false),
MON_EVENT(PMT_EVENT_UOPS_RETIRED, "uops_retired", RDT_RESOURCE_PERF_PKG, false),
+ MON_EVENT(PMT_EVENT_INST_RETIRED, "inst_retired", RDT_RESOURCE_PERF_PKG, false),
+ MON_EVENT(PMT_EVENT_PCNT, "pcnt", RDT_RESOURCE_PERF_PKG, false),
};
bool resctrl_enable_mon_event(enum resctrl_event_id eventid, bool any_cpu,
diff --git a/include/linux/resctrl_types.h b/include/linux/resctrl_types.h
index a5f56fa..e2e2cf3 100644
--- a/include/linux/resctrl_types.h
+++ b/include/linux/resctrl_types.h
@@ -60,6 +60,8 @@ enum resctrl_event_id {
PMT_EVENT_AUTO_C6_RES,
PMT_EVENT_UNHALTED_REF_CYCLES,
PMT_EVENT_UOPS_RETIRED,
+ PMT_EVENT_INST_RETIRED,
+ PMT_EVENT_PCNT,
/* Must be the last */
QOS_NUM_EVENTS,
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-01 6:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-30 17:15 [PATCH v4] x86,fs/resctrl: Add event group descriptions for Intel Diamond Rapids Tony Luck
2026-10-01 6:01 ` [tip: x86/cache] " tip-bot2 for Tony Luck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®