Re: [PATCH v11 16/31] x86,fs/resctrl: Add architectural event pointer
From: Reinette Chatre
Date: Fri Oct 03 2025 - 19:39:06 EST
Hi Tony,
On 9/25/25 1:03 PM, Tony Luck wrote:
> The resctrl file system layer passes the domain, RMID, and event id to
> resctrl_arch_rmid_read() to fetch an event counter.
>
> Fetching a telemetry event counter requires additional information that
> is private to the architecture, for example, the offset into MMIO space
> from where counter should be read.
>
> Add mon_evt::arch_priv void pointer. Architecture code can initialize
> this when marking each event enabled.
>
> File system code passes this pointer to resctrl_arch_rmid_read().
A suggestion to avoid describing code that can be seen from the patch:
The resctrl file system layer passes the domain, RMID, and event id to
the architecture to fetch an event counter.
Fetching a telemetry event counter requires additional information that
is private to the architecture, for example, the offset into MMIO space
from where the counter should be read.
Add mon_evt::arch_priv that architecture can use for any private
data related to the event. resctrl filesystem initializes mon_evt::arch_priv
when the architecture enables the event and passes it back to architecture
when needing to fetch an event counter.
>
> Suggested-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>
> Signed-off-by: Tony Luck <tony.luck@xxxxxxxxx>
> ---
Reinette