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 <cata…@arm.com>
> Cc: Will Deacon <wi…@kernel.org>
> Cc: Mark Rutland <mark…@arm.com>
> Cc: Anshuman Khandual <ansh…@arm.com>
> Cc: linu…@lists.infradead.org
> Signed-off-by: Harry Yoo (Meta) <har…@kernel.org>
> ---
> arch/arm64/mm/pgd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Looks good to me.
Reviewed-by: Hao Li <hao…@linux.dev>
--
Thanks,
Hao