[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d3b7c22f-4435-42da-9e8a-90f86d64dbf1@intel.com>
Date: Fri, 25 Jul 2025 16:43:04 -0700
From: Reinette Chatre <reinette.chatre@...el.com>
To: Tony Luck <tony.luck@...el.com>, Fenghua Yu <fenghuay@...dia.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>, Chen Yu <yu.c.chen@...el.com>
CC: <x86@...nel.org>, <linux-kernel@...r.kernel.org>,
<patches@...ts.linux.dev>
Subject: Re: [PATCH v7 20/31] x86,fs/resctrl: Fill in details of events for
guid 0x26696143 and 0x26557651
Hi Tony,
On 7/11/25 4:53 PM, Tony Luck wrote:
> These two guids describe the events supported on Clearwater Forest.
>
> The offsets in MMIO space are arranged in groups for each RMID.
>
> E.g the "energy counters for guid 0x26696143 are arranged like this:
Missing end-quote.
>
> MMIO offset:0x0000 Counter for RMID 0 PMT_EVENT_ENERGY
> MMIO offset:0x0008 Counter for RMID 0 PMT_EVENT_ACTIVITY
> MMIO offset:0x0010 Counter for RMID 1 PMT_EVENT_ENERGY
> MMIO offset:0x0018 Counter for RMID 1 PMT_EVENT_ACTIVITY
> ...
> MMIO offset:0x23F0 Counter for RMID 575 PMT_EVENT_ENERGY
> MMIO offset:0x23F8 Counter for RMID 575 PMT_EVENT_ACTIVITY
>
> Define these events in the file system code and add the events
> to the event_group structures.
>
> PMT_EVENT_ENERGY and PMT_EVENT_ACTIVITY are produced in fixed point
> format. File system code must output as floating point values.
>
> Signed-off-by: Tony Luck <tony.luck@...el.com>
> ---
> include/linux/resctrl_types.h | 11 ++++++++
> arch/x86/kernel/cpu/resctrl/intel_aet.c | 35 +++++++++++++++++++++++++
> fs/resctrl/monitor.c | 35 ++++++++++++++-----------
> 3 files changed, 66 insertions(+), 15 deletions(-)
>
> diff --git a/include/linux/resctrl_types.h b/include/linux/resctrl_types.h
> index d98351663c2c..6838b02d5ca3 100644
> --- a/include/linux/resctrl_types.h
> +++ b/include/linux/resctrl_types.h
> @@ -47,6 +47,17 @@ enum resctrl_event_id {
> QOS_L3_MBM_TOTAL_EVENT_ID = 0x02,
> QOS_L3_MBM_LOCAL_EVENT_ID = 0x03,
>
> + /* Intel Telemetry Events */
> + PMT_EVENT_ENERGY,
> + PMT_EVENT_ACTIVITY,
> + PMT_EVENT_STALLS_LLC_HIT,
> + PMT_EVENT_C1_RES,
> + PMT_EVENT_UNHALTED_CORE_CYCLES,
> + PMT_EVENT_STALLS_LLC_MISS,
> + PMT_EVENT_AUTO_C6_RES,
> + PMT_EVENT_UNHALTED_REF_CYCLES,
> + PMT_EVENT_UOPS_RETIRED,
> +
> /* 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 3f383f0a9d08..f4bf0f2ccf26 100644
> --- a/arch/x86/kernel/cpu/resctrl/intel_aet.c
> +++ b/arch/x86/kernel/cpu/resctrl/intel_aet.c
> @@ -32,6 +32,20 @@ struct pkg_mmio_info {
> void __iomem *addrs[] __counted_by(num_regions);
> };
>
> +/**
> + * struct pmt_event - Telemetry event.
> + * @id: Resctrl event id.
> + * @idx: Counter index within each per-RMID block of counters.
> + * @bin_bits: Zero for integer valued events, else number bits in fixed-point.
Is this obvious which part of fixed-point this refers to? Compare with, for example,
"else number of bits in fraction part of fixed-point"?
> + */
> +struct pmt_event {
> + enum resctrl_event_id id;
> + unsigned int idx;
> + unsigned int bin_bits;
> +};
> +
...
> @@ -178,6 +211,8 @@ static int discover_events(struct event_group *e, struct pmt_feature_group *p)
> }
> e->pkginfo = no_free_ptr(pkginfo);
>
> + list_add(&e->list, &active_event_groups);
> +
Stray change?
I have not seen any changelog mention active_event_groups and how it is used.
Reinette
Powered by blists - more mailing lists