Re: [PATCH v2 10/16] mm/slab: replace slab_alloc_node() parameters with slab_alloc_context

From: Suren Baghdasaryan

Date: Mon Jun 15 2026 - 00:40:23 EST


On Thu, Jun 11, 2026 at 10:29 PM Hao Li <hao.li@xxxxxxxxx> wrote:
>
> On Wed, Jun 10, 2026 at 05:40:12PM +0200, Vlastimil Babka (SUSE) wrote:
> > The function takes all the parameters that exist as fields in
> > slab_alloc_context, except alloc_flags. Replace them with a single
> > pointer.
> >
> > This moves slab_alloc_context initialization to a number of callers,
> > which is more verbose, but arguably also more clear than a long list of
> > parameters, and most do not use the 'lru' field.
> >
> > This will also allow kmalloc_nolock() to call slab_alloc_node() and
> > reduce the special open-coding it currently has.
> >
> > Signed-off-by: Vlastimil Babka (SUSE) <vbabka@xxxxxxxxxx>
> > ---
>
> Reviewed-by: Hao Li <hao.li@xxxxxxxxx>

Reviewed-by: Suren Baghdasaryan <surenb@xxxxxxxxxx>

>
> --
> Thanks,
> Hao