Re: [PATCH 3/4] slab: use struct freelist_counters for local variables instead of struct slab
From: Harry Yoo
Date: Thu Nov 13 2025 - 02:46:16 EST
On Fri, Nov 07, 2025 at 02:51:25PM +0100, Vlastimil Babka wrote:
> In several functions we declare local struct slab variables so we can
> work with the freelist and counters fields (including the sub-counters
> that are in the union) comfortably.
>
> With struct freelist_counters containing the full counters definition,
> we can now reduce the local variables to that type as we don't need the
> other fields in struct slab.
>
> Signed-off-by: Vlastimil Babka <vbabka@xxxxxxx>
> ---
Yeah I've also been thinking there should be a type for the counters
instead of declaring struct slab variables like this.
Cheers to -fms-extensions! :)
Looks good to me,
Reviewed-by: Harry Yoo <harry.yoo@xxxxxxxxxx>
--
Cheers,
Harry / Hyeonggon