Re: [PATCH] mm/slub: serve slabobj_ext array from a strictly larger kmalloc cache
From: Shakeel Butt
Date: Mon Jun 29 2026 - 15:53:12 EST
On Sun, Jun 28, 2026 at 09:28:51PM -0700, Suren Baghdasaryan wrote:
> On Sun, Jun 28, 2026 at 8:57 PM Harry Yoo <harry@xxxxxxxxxx> wrote:
> >
> >
[...]
Thanks all for great discussion. Let me summarize the conclusion and please
correct me if I missed something.
Let's keep the original one-line fix (serve the obj_exts array from a
strictly larger cache, making the relation a DAG). We will NOT gate it on
mem_alloc_profiling_enabled() as I floated earlier -- per Harry,
is_kmalloc_normal(s) is already the right condition, and gating on
profiling would miss the SLUB_TINY + __GFP_RECLAIMABLE|__GFP_ACCOUNT memcg
case. So the bump stays unconditional for is_kmalloc_normal() caches.
This over-allocates the array for larger caches, but only for profiling and
SLUB_TINY+MEMCG users (the latter unrealistic). Acceptable for a small,
backportable fix.
thanks,
Shakeel