Messages in this thread |  | | Date | Tue, 2 Dec 2025 08:21:36 -0800 | | Subject | Re: [PATCH v14 20/32] x86/resctrl: Read telemetry events | | From | Reinette Chatre <> |
| |
Hi Tony,
On 11/24/25 10:53 AM, Tony Luck wrote: > 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. 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> > ---
...
> diff --git a/arch/x86/kernel/cpu/resctrl/intel_aet.c b/arch/x86/kernel/cpu/resctrl/intel_aet.c > index b6b50650e634..bf3c70590d4c 100644 > --- a/arch/x86/kernel/cpu/resctrl/intel_aet.c > +++ b/arch/x86/kernel/cpu/resctrl/intel_aet.c > @@ -12,13 +12,17 @@ > #define pr_fmt(fmt) "resctrl: " fmt > > #include <linux/array_size.h> > +#include <linux/bits.h> > #include <linux/cleanup.h> > #include <linux/compiler_types.h> > +#include <linux/container_of.h> > #include <linux/cpu.h> > #include <linux/err.h> > +#include <linux/errno.h> > #include <linux/init.h> > #include <linux/intel_pmt_features.h> > #include <linux/intel_vsec.h> > +#include <linux/io.h> > #include <linux/overflow.h> > #include <linux/printk.h> > #include <linux/resctrl.h> > @@ -221,3 +225,50 @@ void __exit intel_aet_exit(void) > } > } > } > + > +#define DATA_VALID BIT_ULL(63) > +#define DATA_BITS GENMASK_ULL(62, 0) > + > +/* > + * Read counter for an event on a domain (summing all aggregators > + * on the domain). If an aggregator hasn't received any data for a > + * specific RMID, the MMIO read indicates that data is not valid. > + * Return success if at least one aggregator has valid data.
unnecessary short lines
> + */ > +int intel_aet_read_event(int domid, u32 rmid, void *arch_priv, u64 *val) > +{
| Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Reinette
|  |