[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c16c1b3e-0c99-19d7-6181-364a928472b1@nvidia.com>
Date: Thu, 3 Dec 2020 08:51:08 -0800
From: John Hubbard <jhubbard@...dia.com>
To: Pavel Tatashin <pasha.tatashin@...een.com>
CC: LKML <linux-kernel@...r.kernel.org>, linux-mm <linux-mm@...ck.org>,
"Andrew Morton" <akpm@...ux-foundation.org>,
Vlastimil Babka <vbabka@...e.cz>,
"Michal Hocko" <mhocko@...e.com>,
David Hildenbrand <david@...hat.com>,
Oscar Salvador <osalvador@...e.de>,
Dan Williams <dan.j.williams@...el.com>,
Sasha Levin <sashal@...nel.org>,
Tyler Hicks <tyhicks@...ux.microsoft.com>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
<mike.kravetz@...cle.com>, Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...hat.com>, Jason Gunthorpe <jgg@...pe.ca>,
Peter Zijlstra <peterz@...radead.org>,
Mel Gorman <mgorman@...e.de>,
Matthew Wilcox <willy@...radead.org>,
David Rientjes <rientjes@...gle.com>
Subject: Re: [PATCH 5/6] mm: honor PF_MEMALLOC_NOMOVABLE for all allocations
On 12/3/20 7:06 AM, Pavel Tatashin wrote:
...
>>> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
>>> index 611799c72da5..7a6d86d0bc5f 100644
>>> --- a/mm/page_alloc.c
>>> +++ b/mm/page_alloc.c
>>> @@ -3766,20 +3766,25 @@ alloc_flags_nofragment(struct zone *zone, gfp_t gfp_mask)
>>> return alloc_flags;
>>> }
>>>
>>> -static inline unsigned int current_alloc_flags(gfp_t gfp_mask,
>>> - unsigned int alloc_flags)
>>> +static inline unsigned int cma_alloc_flags(gfp_t gfp_mask,
>>> + unsigned int alloc_flags)
>>
>> Actually, maybe the original name should be left intact. This handles current alloc
>> flags, which right now happen to only cover CMA flags, so the original name seems
>> accurate, right?
>
> The reason I re-named it is because we do not access current context
> anymore, only use gfp_mask to get cma flag.
>>> - unsigned int pflags = current->flags;
>
> So, keeping "current" in the function name makes its intent misleading.
>
OK, I see. That sounds OK then.
thanks,
--
John Hubbard
NVIDIA
Powered by blists - more mailing lists