linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>
To: Kuniyuki Iwashima <kuniyu@google.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Christoph Lameter <cl@gentwo.org>,
	David Rientjes <rientjes@google.com>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	Harry Yoo <harry.yoo@oracle.com>,
	Kuniyuki Iwashima <kuni1840@gmail.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Hao Li <hao.li@linux.dev>
Subject: Re: [PATCH] slab: Update stale comment for sheaf_capacity.
Date: Wed, 4 Mar 2026 13:30:27 +0100	[thread overview]
Message-ID: <be2de159-91aa-47a3-8da3-f186c2e38a03@kernel.org> (raw)
In-Reply-To: <20260228201510.973702-1-kuniyu@google.com>

On 2/28/26 9:15 PM, Kuniyuki Iwashima wrote:
> 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.
> 
> Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>

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

> ---
>  include/linux/slab.h | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/include/linux/slab.h b/include/linux/slab.h
> index 15a60b501b95..7477109eb315 100644
> --- a/include/linux/slab.h
> +++ b/include/linux/slab.h
> @@ -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.



      parent reply	other threads:[~2026-03-04 12:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-28 20:15 Kuniyuki Iwashima
2026-03-04  1:55 ` Harry Yoo
2026-03-04 12:30 ` Vlastimil Babka (SUSE) [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=be2de159-91aa-47a3-8da3-f186c2e38a03@kernel.org \
    --to=vbabka@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=cl@gentwo.org \
    --cc=hao.li@linux.dev \
    --cc=harry.yoo@oracle.com \
    --cc=kuni1840@gmail.com \
    --cc=kuniyu@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    /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