Re: [PATCH] mm/slab: don't set SLAB_MAY_ACCOUNT for KMALLOC_PARTITION_CACHES

From: Harry Yoo (Meta)

Date: Mon Nov 23 2026 - 09:48:35 EST


On Wed, 11 Nov 2026 20:49:10 +0800, Hao Li wrote:
> An allocation with __GFP_ACCOUNT set (without __GFP_DMA or
> __GFP_RECLAIMABLE) is redirected to KMALLOC_CGROUP and will never hit
> KMALLOC_NORMAL or KMALLOC_PARTITION_CACHES. Consequently, neither of
> these caches requires objcg slots in obj_exts.
>
> While KMALLOC_NORMAL already skips setting SLAB_MAY_ACCOUNT,
> KMALLOC_PARTITION_CACHES still carries it unnecessarily.
>
> [...]

Applied to mm/slab.git for-next, thanks!

[1/1] mm/slab: don't set SLAB_MAY_ACCOUNT for KMALLOC_PARTITION_CACHES
commit: ec81fa8f7dbcf89d9b4112544f76f47c8eb5c725

--
Cheers,
Harry / Hyeonggon