Re: [PATCH v3 13/21] slab: remove defer_deactivate_slab()

Hao Li
2026-01-20T09:35:55Z

On Fri, Jan 16, 2026 at 03:40:33PM +0100, Vlastimil Babka wrote:
> There are no more cpu slabs so we don't need their deferred
> deactivation. The function is now only used from places where we
> allocate a new slab but then can't spin on node list_lock to put it on
> the partial list. Instead of the deferred action we can free it directly
> via __free_slab(), we just need to tell it to use _nolock() freeing of
> the underlying pages and take care of the accounting.
>
> Since free_frozen_pages_nolock() variant does not yet exist for code
> outside of the page allocator, create it as a trivial wrapper for
> __free_frozen_pages(..., FPI_TRYLOCK).
>
> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
> ---
> mm/internal.h | 1 +
> mm/page_alloc.c | 5 +++++
> mm/slab.h | 8 +-------
> mm/slub.c | 56 ++++++++++++++++++++------------------------------------
> 4 files changed, 27 insertions(+), 43 deletions(-)
>

Looks good to me.
Reviewed-by: Hao Li <hao.li@linux.dev>

--
Thanks,
Hao