Re: [PATCH v4 20/22] slab: remove frozen slab checks from __slab_free()

Harry Yoo
2026-01-29T08:05:06Z

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@google.com>
> Reviewed-by: Hao Li <hao.li@linux.dev>
> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
> ---

Looks good to me,
Reviewed-by: Harry Yoo <harry.yoo@oracle.com>

> 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