Re: [PATCH v1] fs/resctrl: Allocate rmid_ptrs[] using kvzalloc_objs()
From: Reinette Chatre
Date: Thu Aug 20 2026 - 19:26:09 EST
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?
> Signed-off-by: Ben Horgan <ben.horgan@xxxxxxx>
> ---
Reinette