From: Qu Wenruo <wqu@suse.com>
To: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>,
Christoph Hellwig <hch@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>,
Brendan Jackman <jackmanb@google.com>,
Johannes Weiner <hannes@cmpxchg.org>, Zi Yan <ziy@nvidia.com>,
Matthew Wilcox <willy@infradead.org>
Cc: linux-btrfs@vger.kernel.org, linux-block@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: [PATCH] block: do not warn when doing greedy allocation in folio_alloc_greedy()
Date: Thu, 16 Jul 2026 20:03:14 +0930 [thread overview]
Message-ID: <929ed316-664e-47d9-a4cf-7ec8750fbfb0@suse.com> (raw)
In-Reply-To: <eb4d4f50-f60f-4a4e-8e9b-6dbb69b8e0e4@kernel.org>
在 2026/7/16 19:35, Vlastimil Babka (SUSE) 写道:
> On 7/16/26 11:29, Christoph Hellwig wrote:
>> On Tue, Jul 14, 2026 at 06:37:39PM +0930, Qu Wenruo wrote:
>>> while (*size > minsize) {
>>> - folio = folio_alloc(gfp | __GFP_NORETRY, get_order(*size));
>>> + folio = folio_alloc(gfp | __GFP_NORETRY | __GFP_NOWARN,
>>> + get_order(*size));
>>
>> I though I read somewhere that we now don't have to specify
>> __GFP_NOWARN when using __GFP_NORETRY, but a quick dive into the page
>> allocator suggest that no such thing exists.
>
> There was a change a while ago that added __GFP_NOWARN to GFP_NOWAIT, maybe
> that's what you read about?
>
>> But can we make it happen? Having to specify __GFP_NOWARN when the
>> caller clearly indicated that failure is perfectly fine using
>> __GFP_NORETRY is silly. The same probably applies to
>> __GFP_RETRY_MAYFAIL.
>
> It makes sense to me. The risk of missing some useful warning due to a
> coding error (conjuring up an unexpected __GFP_NORETRY/__GFP_RETRY_MAYFAIL
> in whatever way and then silently failing) is probably low here and it makes
> the API better.
Yep, making NORETRY and NOWAIT to imply NOWARN looks very reasonable to
me too.
Thanks,
Qu
prev parent reply other threads:[~2026-07-16 10:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 9:07 [PATCH] block: do not warn when doing greedy allocation in folio_alloc_greedy() Qu Wenruo
2026-07-15 22:34 ` Jens Axboe
2026-07-16 9:29 ` Christoph Hellwig
2026-07-16 10:05 ` Vlastimil Babka (SUSE)
2026-07-16 10:33 ` Qu Wenruo [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=929ed316-664e-47d9-a4cf-7ec8750fbfb0@suse.com \
--to=wqu@suse.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=hch@infradead.org \
--cc=jackmanb@google.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
--cc=willy@infradead.org \
--cc=ziy@nvidia.com \
/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