slab: Update stale comment for sheaf_capacity.
Subsystems (2)
PATCH 1/1 slab: Update stale comment for sheaf_capacity.
The comment for sheaf_capacity says it does not enforce NUMA placement, but it's not true since commit 4ec1a08d2031 ("slab:
allow NUMA restricted allocations to use percpu sheaves").
Let's update the comment.
--- include/linux/slab.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
include/linux/slab.h +2 -3
@@ -359,9 +359,8 @@ struct kmem_cache_args {* may replace it with an empty sheaf, unless it's over capacity. In * that case a sheaf is bulk freed to slab pages. * -* 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. +* The sheaves try to enforce NUMA placement of objects, but the +* allocation may fall back to the normal operation. * * Bulk allocation and free operations also try to use the cpu sheaves * and barn, but fallback to using slab pages directly.
Signature · 1 line
2.53.0.473.g4a7958ca14-goog
Quoted 8 lines · Kuniyuki Iwashima
The comment for
sheaf_capacitysays it does not enforce NUMA placement, but it's not true since commit4ec1a08d2031("slab:
allow NUMA restricted allocations to use percpu sheaves").Let's update the comment.
Signed-off-by Kuniyuki Iwashima <[email protected]>---
Signature · 2 lines
Cheers, Harry / Hyeonggon
Quoted 21 lines
include/linux/slab.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)include/linux/slab.h +2
-3@@ -359,9 +359,8 @@ struct kmem_cache_args {* may replace it with an empty sheaf, unless it's over capacity. In * that case a sheaf is bulk freed to slab pages. * -* 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. +* The sheaves try to enforce NUMA placement of objects, but the +* allocation may fall back to the normal operation. * * Bulk allocation and free operations also try to use the cpu sheaves * and barn, but fallback to using slab pages directly. Signature · 1 line
2.53.0.473.g4a7958ca14-goog
Vlastimil Babka (SUSE)
maintainerQuoted 7 lines · Kuniyuki Iwashima
The comment for
sheaf_capacitysays it does not enforce NUMA placement, but it's not true since commit4ec1a08d2031("slab:
allow NUMA restricted allocations to use percpu sheaves").Let's update the comment.
Signed-off-by Kuniyuki Iwashima <[email protected]>
Hm the comment is now more stale than the NUMA aspect. With 7.0-rc1 sheaves exist for all (non-debug) caches. We probably don't need to explain the implementation details there anymore. That includes the NUMA aspect as well. The sheaf_capacity argument can partially override (make it larger, but not smaller) the automatic sheaf size calculation.
Would you like to rewrite the comment as per above then?
Thanks,
Vlastimil
Quoted 20 lines
--- include/linux/slab.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)include/linux/slab.h +2
-3@@ -359,9 +359,8 @@ struct kmem_cache_args {* may replace it with an empty sheaf, unless it's over capacity. In * that case a sheaf is bulk freed to slab pages. * -* 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. +* The sheaves try to enforce NUMA placement of objects, but the +* allocation may fall back to the normal operation. * * Bulk allocation and free operations also try to use the cpu sheaves * and barn, but fallback to using slab pages directly.