Re: [PATCH v4 20/22] slab: remove frozen slab checks from __slab_free()
From: Harry Yoo
Date: Thu Jan 29 2026 - 02:19:20 EST
On Fri, Jan 23, 2026 at 07:52:58AM +0100, Vlastimil Babka wrote:
> Currently slabs are only frozen after consistency checks failed. This
> can happen only in caches with debugging enabled, and those use
> free_to_partial_list() for freeing. The non-debug operation of
> __slab_free() can thus stop considering the frozen field, and we can
> remove the FREE_FROZEN stat.
>
> Reviewed-by: Suren Baghdasaryan <surenb@xxxxxxxxxx>
> Reviewed-by: Hao Li <hao.li@xxxxxxxxx>
> Signed-off-by: Vlastimil Babka <vbabka@xxxxxxx>
> ---
Looks good to me,
Reviewed-by: Harry Yoo <harry.yoo@xxxxxxxxxx>
> mm/slub.c | 22 ++++------------------
> 1 file changed, 4 insertions(+), 18 deletions(-)
>
> diff --git a/mm/slub.c b/mm/slub.c
> index d9fc56122975..3009eb7bd8d2 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -5145,7 +5143,7 @@ static void __slab_free(struct kmem_cache *s, struct slab *slab,
> * to (due to not being full anymore) the partial list.
> * Unless it's frozen.
nit: "Unless it's frozen" part in the comment could be removed.
--
Cheers,
Harry / Hyeonggon