Re: [RFC 4/4] mm: Ignore cpuset enforcement when allocation flag has __GFP_THISNODE

2016-11-30 Thread Dave Hansen
On 11/30/2016 03:17 AM, Anshuman Khandual wrote: > Right but what is the rationale behind this ? This what is in the in-code > documentation for this function __cpuset_node_allowed(). > > *GFP_KERNEL - any node in enclosing hardwalled cpuset ok > > If the allocation has requested

Re: [RFC 4/4] mm: Ignore cpuset enforcement when allocation flag has __GFP_THISNODE

2016-11-30 Thread Dave Hansen
On 11/30/2016 03:17 AM, Anshuman Khandual wrote: > Right but what is the rationale behind this ? This what is in the in-code > documentation for this function __cpuset_node_allowed(). > > *GFP_KERNEL - any node in enclosing hardwalled cpuset ok > > If the allocation has requested

Re: [RFC 4/4] mm: Ignore cpuset enforcement when allocation flag has __GFP_THISNODE

2016-11-30 Thread Anshuman Khandual
On 11/29/2016 10:22 PM, Dave Hansen wrote: > On 11/28/2016 10:51 PM, Anshuman Khandual wrote: >> 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 *

Re: [RFC 4/4] mm: Ignore cpuset enforcement when allocation flag has __GFP_THISNODE

2016-11-30 Thread Anshuman Khandual
On 11/29/2016 10:22 PM, Dave Hansen wrote: > On 11/28/2016 10:51 PM, Anshuman Khandual wrote: >> 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 *

Re: [RFC 4/4] mm: Ignore cpuset enforcement when allocation flag has __GFP_THISNODE

2016-11-29 Thread Dave Hansen
On 11/28/2016 10:51 PM, Anshuman Khandual wrote: > 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 =

Re: [RFC 4/4] mm: Ignore cpuset enforcement when allocation flag has __GFP_THISNODE

2016-11-29 Thread Dave Hansen
On 11/28/2016 10:51 PM, Anshuman Khandual wrote: > 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 =

Re: [RFC 4/4] mm: Ignore cpuset enforcement when allocation flag has __GFP_THISNODE

2016-11-28 Thread Anshuman Khandual
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()) {

Re: [RFC 4/4] mm: Ignore cpuset enforcement when allocation flag has __GFP_THISNODE

2016-11-28 Thread Anshuman Khandual
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()) {

Re: [RFC 4/4] mm: Ignore cpuset enforcement when allocation flag has __GFP_THISNODE

2016-11-28 Thread Dave Hansen
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 &

Re: [RFC 4/4] mm: Ignore cpuset enforcement when allocation flag has __GFP_THISNODE

2016-11-28 Thread Dave Hansen
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 &

[RFC 4/4] mm: Ignore cpuset enforcement when allocation flag has __GFP_THISNODE

2016-11-22 Thread Anshuman Khandual
__GFP_THISNODE specifically asks the memory to be allocated from the given node. Not all the requests that end up in __alloc_pages_nodemask() are originated from the process context where cpuset makes more sense. The current condition enforces cpuset limitation on every allocation whether

[RFC 4/4] mm: Ignore cpuset enforcement when allocation flag has __GFP_THISNODE

2016-11-22 Thread Anshuman Khandual
__GFP_THISNODE specifically asks the memory to be allocated from the given node. Not all the requests that end up in __alloc_pages_nodemask() are originated from the process context where cpuset makes more sense. The current condition enforces cpuset limitation on every allocation whether