]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
slab: remove struct kmem_cache_cpu
authorVlastimil Babka <vbabka@suse.cz>
Fri, 23 Jan 2026 06:52:54 +0000 (07:52 +0100)
committerVlastimil Babka <vbabka@suse.cz>
Thu, 29 Jan 2026 08:29:27 +0000 (09:29 +0100)
commit32c894c7274b7ce901041ce6dceeca3ec1152205
treee857991f1f16cca4f086bef5c4cb56489a0147c4
parent073d5f156292201f1e49263a62dfa182eeee273f
slab: remove struct kmem_cache_cpu

The cpu slab is not used anymore for allocation or freeing, the
remaining code is for flushing, but it's effectively dead.  Remove the
whole struct kmem_cache_cpu, the flushing code and other orphaned
functions.

The remaining used field of kmem_cache_cpu is the stat array with
CONFIG_SLUB_STATS. Put it instead in a new struct kmem_cache_stats.
In struct kmem_cache, the field is cpu_stats and placed near the
end of the struct.

Reviewed-by: Hao Li <hao.li@linux.dev>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
mm/slab.h
mm/slub.c