From: Chris Bainbridge <chris.bainbridge@gmail.com>
To: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>
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: Mon, 23 Feb 2026 19:46:55 +0000 [thread overview]
Message-ID: <aZyur67rmiOT9zY7@debian.local> (raw)
In-Reply-To: <e4f3b873-7825-46e3-831c-d0f5d3761ce4@kernel.org>
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.
prev parent reply other threads:[~2026-02-23 19:47 UTC|newest]
Thread overview: 3+ 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 [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=aZyur67rmiOT9zY7@debian.local \
--to=chris.bainbridge@gmail.com \
--cc=akpm@linux-foundation.org \
--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@kernel.org \
--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