Re: [PATCH v3 12/21] slab: remove the do_slab_free() fastpath

From: Suren Baghdasaryan

Date: Wed Jan 21 2026 - 11:57:29 EST


On Tue, Jan 20, 2026 at 12:30 PM Hao Li <hao.li@xxxxxxxxx> wrote:
>
> On Fri, Jan 16, 2026 at 03:40:32PM +0100, Vlastimil Babka wrote:
> > We have removed cpu slab usage from allocation paths. Now remove
> > do_slab_free() which was freeing objects to the cpu slab when
> > the object belonged to it. Instead call __slab_free() directly,
> > which was previously the fallback.
> >
> > This simplifies kfree_nolock() - when freeing to percpu sheaf
> > fails, we can call defer_free() directly.
> >
> > Also remove functions that became unused.
> >
> > Reviewed-by: Suren Baghdasaryan <surenb@xxxxxxxxxx>
> > Signed-off-by: Vlastimil Babka <vbabka@xxxxxxx>
> > ---
> > mm/slub.c | 149 ++++++--------------------------------------------------------
> > 1 file changed, 13 insertions(+), 136 deletions(-)
> >
>
> Looks good to me.
> Reviewed-by: Hao Li <hao.li@xxxxxxxxx>

There are some hits in the comments on __update_cpu_freelist_fast and
do_slab_free but you remove them later. Nice cleanup!

Reviewed-by: Suren Baghdasaryan <surenb@xxxxxxxxxx>

>
> --
> Thanks,
> Hao