Re: [RFC 02/13] mm, page_alloc: set alloc_flags only once in slowpath
From: Vlastimil Babka
Date: Tue May 10 2016 - 08:30:27 EST
On 05/10/2016 01:28 PM, Tetsuo Handa wrote:
> Vlastimil Babka wrote:
>> In __alloc_pages_slowpath(), alloc_flags doesn't change after it's initialized,
>> so move the initialization above the retry: label. Also make the comment above
>> the initialization more descriptive.
>
> Not true. gfp_to_alloc_flags() will include ALLOC_NO_WATERMARKS if current
> thread got TIF_MEMDIE after gfp_to_alloc_flags() was called for the first
Oh, right. Stupid global state.
> time. Do you want to make TIF_MEMDIE threads fail their allocations without
> using memory reserves?
No, thanks for catching this. How about the following version? I think
that's even nicer cleanup, if correct. Note it causes a conflict in
patch 03/13 but it's simple to resolve.
Thanks
----8<----