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

From: Harry Yoo

Date: Mon Nov 23 2026 - 09:55:00 EST


On Mon, Nov 23, 2026 at 02:48:19PM +0000, Harry Yoo (Meta) wrote:
> 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

Just for the record I added Fixes: tag per Vlastimil's suggestion
but didn't add Cc: stable (dunno if Android would need it (due to random
kmalloc caches), but it can be backported later if needed).

--
Cheers,
Harry / Hyeonggon