Re: [PATCH v10 08/17] x86/resctrl: Enforce system RMID limit on AET event groups

From: Reinette Chatre

Date: Fri Aug 21 2026 - 12:18:20 EST


Hi Tony,

On 8/20/26 4:19 PM, Luck, Tony wrote:
> On Thu, Aug 20, 2026 at 03:28:18PM -0700, Reinette Chatre wrote:

>>
>> Thinking about this more ... does resctrl really need these to be arch helpers? With
>> the mon_capable/alloc_capable available, resctrl fs does not need any help from architecture
>> to learn whether a resource is monitor or alloc capable, no?
>
> x86 and mpam versions of these currently use different iterator functions to walk over all
> resources. But there is a file system version in <linux/resctrl.h> so we
> could do
>
> static inline bool resctrl_alloc_capable(void)
> {
> struct rdt_resource *r;
>
> for_each_rdt_resource(r)
> if ((r)->alloc_capable)
> return true;
> return false;
> }
>
> Ditto with s/alloc/mon/ for the matching partner,
>
> Would you like a patch to replace the arch versions woven into this series?
>
I see this as nice to have but I think it will require more planning than just
weaving it into this series. As you highlight this change will span the architecture
code and now there is also RISC-V to consider. I believe RISC-V is queued for inclusion
but not yet merged and it handles its resctrl_arch_alloc_capable() helper differently.

To me this thus looks more like a separate refactor that will span resctrl fs and all
the architectures.

If you find removing these helpers would help your AET dependency work then the answer is
clear whether it should be done. If it is not required then I do not think it is reasonable
to require this change as part of this AET work and I'll leave it up to you whether you want
to take it on.

Reinette