[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <788d3e5b-40e6-916a-9e3f-7f03fa9d618d@suse.cz>
Date: Thu, 3 Oct 2019 10:00:08 +0200
From: Vlastimil Babka <vbabka@...e.cz>
To: David Rientjes <rientjes@...gle.com>,
Michal Hocko <mhocko@...nel.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Andrea Arcangeli <aarcange@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Mel Gorman <mgorman@...e.de>,
"Kirill A. Shutemov" <kirill@...temov.name>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux-MM <linux-mm@...ck.org>
Subject: Re: [patch for-5.3 0/4] revert immediate fallback to remote hugepages
On 10/3/19 12:32 AM, David Rientjes wrote:
> On Wed, 2 Oct 2019, Michal Hocko wrote:
>
>>>> If
>>>> hugetlb wants to stress this to the fullest extent possible, it already
>>>> appropriately uses __GFP_RETRY_MAYFAIL.
>>>
>>> Which doesn't work anymore right now, and should again after this patch.
>>
>> I didn't get to fully digest the patch Vlastimil is proposing. (Ab)using
>> __GFP_NORETRY is quite subtle but it is already in place with some
>> explanation and a reference to THPs. So while I am not really happy it
>> is at least something you can reason about.
>>
>
> It's a no-op:
>
> /* Do not loop if specifically requested */
> if (gfp_mask & __GFP_NORETRY)
> goto nopage;
>
> /*
> * Do not retry costly high order allocations unless they are
> * __GFP_RETRY_MAYFAIL
> */
> if (costly_order && !(gfp_mask & __GFP_RETRY_MAYFAIL))
> goto nopage;
>
> So I'm not sure we should spend too much time discussing a hunk of a patch
> that doesn't do anything.
I believe Michal was talking about my (ab)use of __GFP_NORETRY, where it
controls the earlier 'goto nopage' condition. Yes, with your patches alone,
the addition of __GFP_NORETRY in the second attempt is a no-op, although
then I don't see the point of confusing people reading the code with it.
Powered by blists - more mailing lists