Re: [PATCH v5 2/7] x86,fs/resctrl: Create 'event_filter' files read only if they're not configurable
From: Reinette Chatre
Date: Mon May 04 2026 - 12:00:14 EST
Hi Ben,
On 4/28/26 6:04 AM, Ben Horgan wrote:
> When the counter assignment mode is mbm_event resctrl assumes the MBM
> events are configurable and exposes the 'event_filter' files. These files
> live at info/L3_MON/event_configs/<event>/event_filter and are used to
> display and set the event configuration.
>
> The MPAM architecture has support for configuring the memory bandwidth
> utilization (MBWU) counters to only count reads or only count
> writes. However, In MPAM, this event filtering support is optional in the
nit: In -> in
> hardware (and not yet implemented in the MPAM driver) but MBM counter
> assignment is always possible for MPAM MBWU counters.
>
> In order to support mbm_event mode with MPAM, create the 'event_filter'
> files read only if the event configuration can't be changed. A user can
> still chmod the file and so also return early with an error from
> event_filter_write().
>
> Introduce a new monitor property, mbm_cntr_configurable, to indicate
> whether or not assignable MBM counters are configurable. On x86, set this
> to true whenever mbm_cntr_assignable is true to keep existing behaviour.
>
> Signed-off-by: Ben Horgan <ben.horgan@xxxxxxx>
> ---
Reviewed-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>
Reinette