]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mm/slab: use stride to access slabobj_ext
authorHarry Yoo <harry.yoo@oracle.com>
Tue, 13 Jan 2026 06:18:41 +0000 (15:18 +0900)
committerVlastimil Babka <vbabka@suse.cz>
Wed, 4 Feb 2026 09:05:35 +0000 (10:05 +0100)
commit7a8e71bc619d34c7607adef0e368d10421b7d4f6
treecd8a066f1ebd537609f228706f1b27af6ea9ce9f
parent52f1ca8a459a73cf423a0b71b59f0b950e522cab
mm/slab: use stride to access slabobj_ext

Use a configurable stride value when accessing slab object extension
metadata instead of assuming a fixed sizeof(struct slabobj_ext).

Store stride value in free bits of slab->counters field. This allows
for flexibility in cases where the extension is embedded within
slab objects.

Since these free bits exist only on 64-bit, any future optimizations
that need to change stride value cannot be enabled on 32-bit architectures.

Suggested-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Harry Yoo <harry.yoo@oracle.com>
Link: https://patch.msgid.link/20260113061845.159790-6-harry.yoo@oracle.com
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
mm/slab.h
mm/slub.c