[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <583D2570.6070109@linux.vnet.ibm.com>
Date: Tue, 29 Nov 2016 12:21:28 +0530
From: Anshuman Khandual <khandual@...ux.vnet.ibm.com>
To: Dave Hansen <dave.hansen@...el.com>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Cc: mhocko@...e.com, vbabka@...e.cz, mgorman@...e.de,
minchan@...nel.org, aneesh.kumar@...ux.vnet.ibm.com,
bsingharora@...il.com, srikar@...ux.vnet.ibm.com,
haren@...ux.vnet.ibm.com, jglisse@...hat.com
Subject: Re: [RFC 4/4] mm: Ignore cpuset enforcement when allocation flag has
__GFP_THISNODE
On 11/29/2016 02:42 AM, Dave Hansen wrote:
> On 11/22/2016 06:19 AM, Anshuman Khandual wrote:
>> --- a/mm/page_alloc.c
>> +++ b/mm/page_alloc.c
>> @@ -3715,7 +3715,7 @@ struct page *
>> .migratetype = gfpflags_to_migratetype(gfp_mask),
>> };
>>
>> - if (cpusets_enabled()) {
>> + if (cpusets_enabled() && !(alloc_mask & __GFP_THISNODE)) {
>> alloc_mask |= __GFP_HARDWALL;
>> alloc_flags |= ALLOC_CPUSET;
>> if (!ac.nodemask)
>
> This means now that any __GFP_THISNODE allocation can "escape" the
> cpuset. That seems like a pretty major change to how cpusets works. Do
> we know that *ALL* __GFP_THISNODE allocations are truly lacking in a
> cpuset context that can be enforced?
Right, I know its a very blunt change. With the cpuset based isolation
of coherent device node for the user space tasks leads to a side effect
that a driver or even kernel cannot allocate memory from the coherent
device node in the task's own context (ioctl() calls or similar). For
non task context allocation (work queues, interrupts, anything async
etc) this problem can be fixed by modifying kernel thread's task->mems
_allowed to include all nodes of the system including the coherent
device nodes. Though I have not figured out the details yet. Whats
your thoughts on this ? What we are looking for is a explicit and
definite way of allocating from the coherent device node inside the
kernel.
Powered by blists - more mailing lists