Re: [PATCH v1] fs/resctrl: Allocate rmid_ptrs[] using kvzalloc_objs()

From: Ben Horgan

Date: Fri Sep 11 2026 - 12:13:27 EST


Hi Reinette,

On 21/08/2026 00:25, Reinette Chatre wrote:
> Hi Ben,
>
> On 7/10/26 4:23 AM, Ben Horgan wrote:
>> On an MPAM system the number of entries in rmid_ptrs[] is the number of PARTIDs
>> multiplied by the number of PMGs. The maximum possible number of PARTIDs is
>> 0x10000 and the maximum number of PMGs is 0x100. On a system pushing the limits
>> of the MPAM specification this can be large enough to consistently fail the
>> kzalloc_objs() allocation and hence fail to mount the resctrl filesystem.
>>
>> Switch to allocating rmid_ptrs[] using kvzalloc_objs() so that large allocations
>> fall back to vmalloc().
>>
>> Fixes: 7168ae330e81 ("x86,fs/resctrl: Move the resctrl filesystem code to live in /fs/resctrl")
>
> This is not the patch that added the original allocation but it is the patch
> that made it possible for MPAM architecture code to be added. At this point there
> is no MPAM support though, could commit 264c285999fc ("arm_mpam: resctrl: Add monitor
> initialisation and domain boilerplate") perhaps be more accurate to present when
> this change may theoretically be needed?

Ok, I can go with that as it's just a potential problem on MPAM.

Thanks,

Ben

>
>> Signed-off-by: Ben Horgan <ben.horgan@xxxxxxx>
>> ---
> Reinette