The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Harry Yoo <harry@kernel.org>
To: Andreas Hindborg <a.hindborg@kernel.org>
Cc: Vlastimil Babka <vbabka@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>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] mm/slab: document that sheaf refill does not require blocking
Date: Thu, 26 Nov 2026 14:50:46 +0000	[thread overview]
Message-ID: <awhG_gYUbcm_y74R@thinkstation> (raw)
In-Reply-To: <20261125-sheaf-doc-update-v1-2-4a579abaf0b8@kernel.org>

On Wed, Nov 25, 2026 at 08:35:13PM +0100, Andreas Hindborg wrote:
> The documentation of the sheaf_capacity member of struct kmem_cache_args
> states that when no full sheaf is available, a sheaf is only allocated and
> filled if the gfp flags allow blocking, and that the allocation otherwise
> falls back to allocating a single object from a slab.
> 
> This has not been the case since commit fb1091febd66 ("mm/slab: allow sheaf
> refill if blocking is not allowed"). __pcs_replace_empty_main() now refills
> a sheaf whenever spinning is allowed. Only kmalloc_nolock() disallows
> spinning, and it allocates from the kmalloc caches, so for caches created
> with kmem_cache_create() the refill is attempted regardless of the gfp
> flags.
> 
> Drop the condition from the documentation, and describe the fallback as
> what happens when the sheaf cannot be allocated or filled.
> 
> Fixes: fb1091febd66 ("mm/slab: allow sheaf refill if blocking is not allowed")
> Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
> ---

Looks good to me,
Reviewed-by: Harry Yoo (Meta) <harry@kernel.org>

-- 
Cheers,
Harry / Hyeonggon

  reply	other threads:[~2026-11-26 14:50 UTC|newest]

Thread overview: 7+ 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-26 14:45   ` Harry Yoo
2026-11-25 19:35 ` [PATCH 2/3] mm/slab: document that sheaf refill does not require blocking Andreas Hindborg
2026-11-26 14:50   ` Harry Yoo [this message]
2026-11-25 19:35 ` [PATCH 3/3] mm/slab: document that local node allocations can use sheaves Andreas Hindborg
2026-11-26 14:53   ` Harry Yoo

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=awhG_gYUbcm_y74R@thinkstation \
    --to=harry@kernel.org \
    --cc=a.hindborg@kernel.org \
    --cc=cl@gentwo.org \
    --cc=hao.li@linux.dev \
    --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