slab updates for 7.2 - part 2
Hi Linus,
please pull the latest slab updates from:
git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git tags/slab-for-7.2-part2
The bigger changes have been in -next before merge window, but due to promised reviews I've waited the extra week (and got them) for this. Most of it is rather mechanistic, but touches a lot of code, so it will help to have it in 7.2-rc1 to base upcoming for-7.3 stuff (e.g. bpf_arena_alloc() or kfree_rcu_nolock()) on that.
Thanks,
Vlastimil
======================================
- Introduce and wire up a new alloc_flags parameter for modifying slab-specific behavior without adding or reusing gfp flags. Also introduce slab_alloc_context to keep function parameter bloat in check. Both are similar to what the page allocator does. kmalloc_flags() exposes alloc_flags for mm-internal users.
SLAB_ALLOC_NOLOCK flag is used to implement kmalloc_nolock() behavior without relying on lack of __GFP_RECLAIM, which caused false positives with workarounds like fd3634312a04 ("debugobject: Make it work with deferred page initialization
- again"). SLAB_ALLOC_NO_RECURSE replaces __GFP_NO_OBJ_EXT, which could have been removed, but pending memory allocation profiling changes in mm tree have grown a new user - there is however a work ongoing to replace that too, so __GFP_NO_OBJ_EXT should eventually be removed. (Vlastimil Babka)
- Add kmem_buckets_alloc_track_caller() with a user to be added in the net tree. (Pedro Falcato)
- Fixes for kernel-doc and slabinfo (Randy Dunlap, Yichong Chen).
----------------------------------------------------------------
The following changes since commit 5d6919055dec134de3c40167a490f33c74c12581:
Linux 7.1-rc3 (2026-05-10 14:08:09 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git tags/slab-for-7.2
for you to fetch changes up to dfdfd58cce1c3f5df8733b64595448996c08e424:
Merge branch 'slab/for-7.2/alloc_token' into slab/for-next (2026-06-12 11:25:12 +0200)
The following changes since commit dfdfd58cce1c3f5df8733b64595448996c08e424:
Merge branch 'slab/for-7.2/alloc_token' into slab/for-next (2026-06-12 11:25:12 +0200)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git tags/slab-for-7.2-part2
for you to fetch changes up to 892a7864730775c3dbee2a39e9ead4fa8d4256e7:
tools/mm/slabinfo: fix total_objects attribute name (2026-06-18 11:19:43 +0200)
----------------------------------------------------------------
slab changes for 7.2 - part 2
----------------------------------------------------------------
Pedro Falcato (1):
mm/slab: add a node-track-caller variant for kmem buckets allocation
Randy Dunlap (1):
slab: recognize @GFP parameter as optional in kernel-doc
Vlastimil Babka (SUSE) (15):
mm/slab: do not init any kfence objects on allocation mm/slab: stop inlining __slab_alloc_node()
mm/slab: introduce slab_alloc_context
mm/slab: introduce alloc_flags and SLAB_ALLOC_NOLOCK mm/slab: replace struct partial_context with slab_alloc_context mm/slab: add alloc_flags to slab_alloc_context
mm/slab: pass alloc_flags to new slab allocation
mm/slab: pass alloc_flags through slab_post_alloc_hook() chain mm/slab: replace slab_alloc_node() parameters with slab_alloc_context mm/slab: allow kmem_cache_alloc_bulk() with any gfp flags mm/slab: pass slab_alloc_context to __do_kmalloc_node() mm/slab: allow __GFP_NOMEMALLOC and __GFP_NOWARN for kmalloc_nolock() mm/slab: introduce kmalloc_flags()
mm/slab: remove __GFP_NO_OBJ_EXT usage from alloc_slab_obj_exts() mm/slab: replace __GFP_NO_OBJ_EXT with SLAB_ALLOC_NO_RECURSE for sheaves
Yichong Chen (1):
tools/mm/slabinfo: fix total_objects attribute name
include/linux/slab.h | 18 +- mm/kfence/core.c | 2 +- mm/memcontrol.c | 5 +- mm/slab.h | 29 ++- mm/slub.c | 488 +++++++++++++++++++++++++++++++-------------------- tools/mm/slabinfo.c | 4 +- 6 files changed, 340 insertions(+), 206 deletions(-)