diff options
| author | Tony Luck <tony.luck@intel.com> | 2025-12-17 09:21:07 -0800 |
|---|---|---|
| committer | Borislav Petkov (AMD) <bp@alien8.de> | 2026-01-09 23:02:57 +0100 |
| commit | 51541f6ca7718d8278e12fe80af80033268743b2 (patch) | |
| tree | 47c65b58a0cf5073b683a4d59ad52f72717b440f /fs/resctrl | |
| parent | 7e6df9614546ae7eb1f1b2074d7b6039bb01540d (diff) | |
x86/resctrl: Read telemetry events
Introduce intel_aet_read_event() to read telemetry events for resource
RDT_RESOURCE_PERF_PKG. There may be multiple aggregators tracking each
package, so scan all of them and add up all counters. Aggregators may return
an invalid data indication if they have received no records for a given RMID.
The user will see "Unavailable" if none of the aggregators on a package
provide valid counts.
Resctrl now uses readq() so depends on X86_64. Update Kconfig.
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://lore.kernel.org/20251217172121.12030-1-tony.luck@intel.com
Diffstat (limited to 'fs/resctrl')
| -rw-r--r-- | fs/resctrl/monitor.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/resctrl/monitor.c b/fs/resctrl/monitor.c index 9af08b673e39..8a4c2ae72740 100644 --- a/fs/resctrl/monitor.c +++ b/fs/resctrl/monitor.c @@ -527,6 +527,20 @@ static int __mon_event_count(struct rdtgroup *rdtgrp, struct rmid_read *rr) return __l3_mon_event_count(rdtgrp, rr); else return __l3_mon_event_count_sum(rdtgrp, rr); + case RDT_RESOURCE_PERF_PKG: { + u64 tval = 0; + + rr->err = resctrl_arch_rmid_read(rr->r, rr->hdr, rdtgrp->closid, + rdtgrp->mon.rmid, rr->evt->evtid, + rr->evt->arch_priv, + &tval, rr->arch_mon_ctx); + if (rr->err) + return rr->err; + + rr->val += tval; + + return 0; + } default: rr->err = -EINVAL; return -EINVAL; |
