From: Qianfeng Rong <rongqianfeng@vivo.com>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: Alasdair Kergon <agk@redhat.com>,
Mike Snitzer <snitzer@kernel.org>,
"open list:DEVICE-MAPPER (LVM)" <dm-devel@lists.linux.dev>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/3] dm bufio: remove redundant __GFP_NOWARN
Date: Tue, 12 Aug 2025 10:18:23 +0800 [thread overview]
Message-ID: <81f495fe-508c-4f7e-8a69-1738343c5a58@vivo.com> (raw)
In-Reply-To: <4fe735d7-736c-7bbb-173a-1bee27bbe92b@redhat.com>
在 2025/8/11 23:10, Mikulas Patocka 写道:
>
> On Mon, 11 Aug 2025, Qianfeng Rong wrote:
>
>> 在 2025/8/11 20:44, Mikulas Patocka 写道:
>>> Hi
>>>
>>> I think that GFP_NOWAIT already includes __GFP_NORETRY too. So, should we
>>> drop __GFP_NORETRY as well?
>> GFP_NOWAIT does not include __GFP_NORETRY:
>> #define GFP_NOWAIT (__GFP_KSWAPD_RECLAIM | __GFP_NOWARN)
>>
>> GFP_NOWAIT tells the memory manager to only wake up kswapd to perform
>> memory reclamation, not to perform direct memory reclaim. Even if the
>> request fails, no error message is printed.
>>
>> Best regards,
>> Qianfeng
> Yes, but if GFP_NOWAIT allocation can't sleep, it can't retry - thus
> GFP_NOWAIT should imply __GFP_NORETRY.
>
> Mikulas
I strongly agree with your perspective, but I'm uncertain whether
GFP_NOWAIT should include __GFP_NORETRY, or if we should add a
note stating GFP_NOWAIT/GFP_ATOMIC should not be combined with
__GFP_NORETRY since it becomes redundant in atomic contexts. I'll
raise this issue to see if others have insights.
Best regards,
Qianfeng
next prev parent reply other threads:[~2025-08-12 2:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-11 12:36 [PATCH 0/3] md: " Qianfeng Rong
2025-08-11 12:36 ` [PATCH 1/3] bcache: " Qianfeng Rong
2025-08-11 13:22 ` Coly Li
2025-08-11 13:46 ` Qianfeng Rong
2025-08-11 12:36 ` [PATCH 2/3] dm bufio: " Qianfeng Rong
2025-08-11 12:44 ` Mikulas Patocka
2025-08-11 12:58 ` Qianfeng Rong
2025-08-11 15:10 ` Mikulas Patocka
2025-08-12 2:18 ` Qianfeng Rong [this message]
2025-08-11 12:36 ` [PATCH 3/3] md/raid5: " Qianfeng Rong
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=81f495fe-508c-4f7e-8a69-1738343c5a58@vivo.com \
--to=rongqianfeng@vivo.com \
--cc=agk@redhat.com \
--cc=dm-devel@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=snitzer@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
all inboxes | Powered by JetHome®