linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>
To: Chris Bainbridge <chris.bainbridge@gmail.com>
Cc: Harry Yoo <harry.yoo@oracle.com>,
	Vlastimil Babka <vbabka@suse.cz>,
	Andrew Morton <akpm@linux-foundation.org>,
	Christoph Lameter <cl@gentwo.org>,
	David Rientjes <rientjes@google.com>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	Hao Li <hao.li@linux.dev>,
	linux-mm@kvack.org
Subject: Re: [PATCH] mm/slab: pass __GFP_NOWARN to refill_sheaf() if fallback is available
Date: Tue, 24 Feb 2026 12:30:11 +0100	[thread overview]
Message-ID: <5e767065-5536-4b95-8a42-c4be5d31c77f@kernel.org> (raw)
In-Reply-To: <aZyur67rmiOT9zY7@debian.local>

On 2/23/26 20:46, Chris Bainbridge wrote:
> On Mon, Feb 23, 2026 at 05:48:25PM +0100, Vlastimil Babka (SUSE) wrote:
>> On 2/23/26 14:33, Harry Yoo wrote:
>> > When refill_sheaf() is called, failing to refill the sheaf doesn't
>> > necessarily mean the allocation will fail because a fallback path
>> > might be available and serve the allocation request.
>> > 
>> > Suppress spurious warnings by passing __GFP_NOWARN along with
>> > __GFP_NOMEMALLOC whenever a fallback path is available.
>> > 
>> > When the caller is alloc_full_sheaf() or __pcs_replace_empty_main(),
>> > the kernel always falls back to the slowpath (__slab_alloc_node()).
>> > For __prefill_sheaf_pfmemalloc(), the fallback path is available
>> > only when gfp_pfmemalloc_allowed() returns true.
>> > 
>> > Reported-by: Chris Bainbridge <chris.bainbridge@gmail.com>
>> > Closes: https://lore.kernel.org/linux-mm/aZt2-oS9lkmwT7Ch@debian.local
>> > Fixes: 1ce20c28eafd ("slab: handle pfmemalloc slabs properly with sheaves")
>> > Link: https://lore.kernel.org/linux-mm/aZwSreGj9-HHdD-j@hyeyoo
>> > Signed-off-by: Harry Yoo <harry.yoo@oracle.com>
>> 
>> Thanks, added to slab/for-next-fixes.
>> Hopefully Chris can confirm it works (without adding the __NOWARN to btrfs code)
> 
> Yes, it works for my test case.

Great, can we add your Tested-by:  then?
Thanks!


      reply	other threads:[~2026-02-24 11:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-23 13:33 Harry Yoo
2026-02-23 16:48 ` Vlastimil Babka (SUSE)
2026-02-23 19:46   ` Chris Bainbridge
2026-02-24 11: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=5e767065-5536-4b95-8a42-c4be5d31c77f@kernel.org \
    --to=vbabka@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=chris.bainbridge@gmail.com \
    --cc=cl@gentwo.org \
    --cc=hao.li@linux.dev \
    --cc=harry.yoo@oracle.com \
    --cc=linux-mm@kvack.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=vbabka@suse.cz \
    /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