Re: [PATCH 1/4] slab: separate struct freelist_tid from kmem_cache_cpu
From: Harry Yoo
Date: Thu Nov 13 2025 - 02:23:27 EST
On Fri, Nov 07, 2025 at 02:51:23PM +0100, Vlastimil Babka wrote:
> In kmem_cache_cpu we currently have a union of the freelist+tid pair
> with freelist_aba_t, relying implicitly on the type compatibility with the
> freelist+counters pair used in freelist_aba_t.
>
> To allow further changes to freelist_aba_t, we can instead define a
> separate struct freelist_tid (instead of a typedef, per the coding
> style) for kmem_cache_cpu, as that affects only a single helper
> __update_cpu_freelist_fast().
>
> We can add the resulting struct freelist_tid to kmem_cache_cpu as
> unnamed field thanks to -fms-extensions, so that freelist and tid fields
> can still be accessed directly.
>
> Signed-off-by: Vlastimil Babka <vbabka@xxxxxxx>
> ---
Looks good to me,
Reviewed-by: Harry Yoo <harry.yoo@xxxxxxxxxx>
--
Cheers,
Harry / Hyeonggon