mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Hindborg <a.hindborg@kernel.org>
To: Vlastimil Babka <vbabka@kernel.org>, Harry Yoo <harry@kernel.org>,
	 Hao Li <hao.li@linux.dev>, Christoph Lameter <cl@gentwo.org>,
	 David Rientjes <rientjes@google.com>,
	 Roman Gushchin <roman.gushchin@linux.dev>,
	 "Liam R. Howlett" <liam@infradead.org>,
	 Suren Baghdasaryan <surenb@google.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	 Andreas Hindborg <a.hindborg@kernel.org>
Subject: [PATCH 3/3] mm/slab: document that local node allocations can use sheaves
Date: Wed, 25 Nov 2026 20:35:14 +0100	[thread overview]
Message-ID: <20261125-sheaf-doc-update-v1-3-4a579abaf0b8@kernel.org> (raw)
In-Reply-To: <20261125-sheaf-doc-update-v1-0-4a579abaf0b8@kernel.org>

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@kernel.org>
---
 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



      parent reply	other threads:[~2026-11-25 19:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 19:35 [PATCH 0/3] mm/slab: update the sheaf documentation in kmem_cache_args Andreas Hindborg
2026-11-25 19:35 ` [PATCH 1/3] mm/slab: update the documentation of sheaf_capacity Andreas Hindborg
2026-11-25 19:35 ` [PATCH 2/3] mm/slab: document that sheaf refill does not require blocking Andreas Hindborg
2026-11-25 19:35 ` Andreas Hindborg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261125-sheaf-doc-update-v1-3-4a579abaf0b8@kernel.org \
    --to=a.hindborg@kernel.org \
    --cc=cl@gentwo.org \
    --cc=hao.li@linux.dev \
    --cc=harry@kernel.org \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=surenb@google.com \
    --cc=vbabka@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®