[PATCH 3/3] mm/slab: document that local node allocations can use sheaves
From: Andreas Hindborg
Date: Wed Nov 25 2026 - 14:36:00 EST
The documentation of the sheaf_capacity member of struct kmem_cache_args
states that allocations via kmem_cache_alloc_node() with a node specified
other than NUMA_NO_NODE bypass the sheaves.
This has not been the case since commit 4ec1a08d2031 ("slab: allow NUMA
restricted allocations to use percpu sheaves"). alloc_from_pcs() only
bypasses the sheaves when the requested node is not the local node. A
request for the local node is served from the sheaves if the object found
there is from that node.
Update the documentation to match.
Fixes: 4ec1a08d2031 ("slab: allow NUMA restricted allocations to use percpu sheaves")
Signed-off-by: Andreas Hindborg <a.hindborg@xxxxxxxxxx>
---
include/linux/slab.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/linux/slab.h b/include/linux/slab.h
index 8f484e1edcd2..ae9f305db9ea 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -369,7 +369,9 @@ struct kmem_cache_args {
*
* The sheaves do not enforce NUMA placement of objects, so allocations
* via kmem_cache_alloc_node() with a node specified other than
- * NUMA_NO_NODE will bypass them.
+ * NUMA_NO_NODE or the local node will bypass them. When the local node
+ * is specified, an object from the sheaves is used only if it is from
+ * that node.
*
* Bulk allocation and free operations also try to use the cpu sheaves
* and barn, but fallback to using slab pages directly.
--
2.54.0