Re: [PATCH slab/for-next v2 07/14] arm64/mm: specify SLAB_MAY_ACCOUNT for pgd_cache

From: Hao Li

Date: Thu Dec 03 2026 - 09:54:36 EST


On Wed, Nov 25, 2026 at 09:37:08PM +0000, Harry Yoo (Meta) wrote:
> When PGD_SIZE != PAGE_SIZE, user PGDs are allocated from pgd_cache
> with GFP_PGTABLE_USER, which includes __GFP_ACCOUNT. Specify
> SLAB_MAY_ACCOUNT when the object may be charged to a memcg.
> __GFP_ACCOUNT without SLAB_MAY_ACCOUNT will not be allowed.
>
> Path (e.g. 64K pages): copy_process() -> mm_init() -> pgd_alloc()
> -> kmem_cache_alloc(pgd_cache, GFP_PGTABLE_USER)
>
> Cc: Catalin Marinas <catalin.marinas@xxxxxxx>
> Cc: Will Deacon <will@xxxxxxxxxx>
> Cc: Mark Rutland <mark.rutland@xxxxxxx>
> Cc: Anshuman Khandual <anshuman.khandual@xxxxxxx>
> Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
> Signed-off-by: Harry Yoo (Meta) <harry@xxxxxxxxxx>
> ---
> arch/arm64/mm/pgd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>

Looks good to me.
Reviewed-by: Hao Li <hao.li@xxxxxxxxx>

--
Thanks,
Hao