summaryrefslogtreecommitdiff
path: root/rust/zerocopy/rustdoc/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorVlastimil Babka (SUSE) <vbabka@kernel.org>2026-06-10 17:40:16 +0200
committerVlastimil Babka (SUSE) <vbabka@kernel.org>2026-06-15 13:29:23 +0200
commitf6d50ab29afd7502f5f74d9814908b93f96f47dd (patch)
tree2cd1e5c92c87532f6c5dfb42405b381ae78a8c4f /rust/zerocopy/rustdoc/git@git.tavy.me:linux.git
parent6dbded46e447113da97bed4a68b02b8aaaffa995 (diff)
mm/slab: introduce kmalloc_flags()
With alloc_flags usage in slab, we can replace __GFP_NO_OBJ_EXT with an alloc flag that prevents kmalloc recursion. For that we need a version of kmalloc() that takes alloc_flags and use it in places that perform these potentially recursive kmalloc allocations (of sheaves or obj_ext arrays). Add this function, named kmalloc_flags(). Right now it's only useful for these nested allocations, so it doesn't need to optimize build-time constant sizes like kmalloc() or kmalloc_buckets. Since we need it to support both normal and non-spinning kmalloc_nolock() context through the SLAB_ALLOC_NOLOCK flag, split out most of the special _kmalloc_nolock_noprof() implementation to __kmalloc_nolock_noprof() that takes a slab_alloc_context, and make _kmalloc_nolock_noprof() a simple tail calling wrapper with the proper context. kmalloc_flags() can thus determine whether to call __kmalloc_nolock_noprof() or __do_kmalloc_node(), based on the given alloc_flags. Link: https://patch.msgid.link/20260610-slab_alloc_flags-v2-14-7190909db118@kernel.org Reviewed-by: Hao Li <hao.li@linux.dev> Reviewed-by: Suren Baghdasaryan <surenb@google.com> Reviewed-by: Harry Yoo (Oracle) <harry@kernel.org> Signed-off-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
Diffstat (limited to 'rust/zerocopy/rustdoc/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions