Re: [PATCH v11 25/31] fs,x86/resctrl: Compute number of RMIDs as minimum across resources
From: Reinette Chatre
Date: Fri Oct 03 2025 - 20:10:55 EST
Hi Tony,
Please use a consistent subject prefix (x86,fs/resctrl) when patch changes both arch
and fs code.
On 9/25/25 1:03 PM, Tony Luck wrote:
> resctrl assumes that only the L3 resource supports monitor events, so
> it simply takes the rdt_resource::num_rmid from RDT_RESOURCE_L3 as
> the system's number of RMIDs.
>
> The addition of telemetry events in a different resource breaks that
> assumption.
>
> Compute the number of available RMIDs as the minimum value across
> all mon_capable resources (analogous to how the number of CLOSIDs
> is computed across alloc_capable resources).
>
> Note that mount time enumeration of the telemetry resource means that
> this number can be reduced. If this happens, then some memory will
> be wasted as the allocations for rdt_l3_mon_domain::mbm_states[] and
> rdt_l3_mon_domain::rmid_busy_llc created during resctrl initialization
> will be larger than needed.
>
> Signed-off-by: Tony Luck <tony.luck@xxxxxxxxx>
> ---
| Reviewed-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>
Reinette