Linux block layer
 help / color / mirror / Atom feed
From: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>
To: Christoph Hellwig <hch@infradead.org>, Qu Wenruo <wqu@suse.com>,
	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 12:05:06 +0200	[thread overview]
Message-ID: <eb4d4f50-f60f-4a4e-8e9b-6dbb69b8e0e4@kernel.org> (raw)
In-Reply-To: <alikjtke-YNWdd1I@infradead.org>

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.

  reply	other threads:[~2026-07-16 10:05 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) [this message]
2026-07-16 10:33     ` Qu Wenruo

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=eb4d4f50-f60f-4a4e-8e9b-6dbb69b8e0e4@kernel.org \
    --to=vbabka@kernel.org \
    --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=willy@infradead.org \
    --cc=wqu@suse.com \
    --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