[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <81f495fe-508c-4f7e-8a69-1738343c5a58@vivo.com>
Date: Tue, 12 Aug 2025 10:18:23 +0800
From: Qianfeng Rong <rongqianfeng@...o.com>
To: Mikulas Patocka <mpatocka@...hat.com>
Cc: Alasdair Kergon <agk@...hat.com>, Mike Snitzer <snitzer@...nel.org>,
"open list:DEVICE-MAPPER (LVM)" <dm-devel@...ts.linux.dev>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/3] dm bufio: remove redundant __GFP_NOWARN
在 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
Powered by blists - more mailing lists