Re: [PATCH RFC v2 02/20] mm/slab: move and refactor __kmem_cache_alias()

From: Suren Baghdasaryan

Date: Thu Jan 15 2026 - 19:06:29 EST


On Tue, Jan 13, 2026 at 7:06 AM Harry Yoo <harry.yoo@xxxxxxxxxx> wrote:
>
> On Mon, Jan 12, 2026 at 04:16:56PM +0100, Vlastimil Babka wrote:
> > Move __kmem_cache_alias() to slab_common.c since it's called by
> > __kmem_cache_create_args() and calls find_mergeable() that both
> > are in this file. We can remove two slab.h declarations and make
> > them static. Instead declare sysfs_slab_alias() from slub.c so
> > that __kmem_cache_alias() can keep caling it.

nit: s/caling/calling

> >
> > Add args parameter to __kmem_cache_alias() and find_mergeable() instead
> > of align and ctor. With that we can also move the checks for usersize
> > and sheaf_capacity there from __kmem_cache_create_args() and make the
> > result more symmetric with slab_unmergeable().
> >
> > No functional changes intended.
> >
> > Signed-off-by: Vlastimil Babka <vbabka@xxxxxxx>
>
> Looks good to me, so:
> Reviewed-by: Harry Yoo <harry.yoo@xxxxxxxxxx>

Reviewed-by: Suren Baghdasaryan <surenb@xxxxxxxxxx>

>
> --
> Cheers,
> Harry / Hyeonggon