Re: MPOL_BIND on memory only nodes

2016-10-13 Thread Michal Hocko
On Thu 13-10-16 16:28:27, Anshuman Khandual wrote: > On 10/13/2016 03:37 PM, Michal Hocko wrote: > > On Thu 13-10-16 15:24:54, Anshuman Khandual wrote: > > [...] > >> Which makes the function look like this. Even with these changes, > >> MPOL_BIND is > >> still going to pick up the local node's

Re: MPOL_BIND on memory only nodes

2016-10-13 Thread Michal Hocko
On Thu 13-10-16 16:28:27, Anshuman Khandual wrote: > On 10/13/2016 03:37 PM, Michal Hocko wrote: > > On Thu 13-10-16 15:24:54, Anshuman Khandual wrote: > > [...] > >> Which makes the function look like this. Even with these changes, > >> MPOL_BIND is > >> still going to pick up the local node's

Re: MPOL_BIND on memory only nodes

2016-10-13 Thread Anshuman Khandual
On 10/12/2016 06:46 PM, Michal Hocko wrote: > On Wed 12-10-16 11:43:37, Michal Hocko wrote: >> On Wed 12-10-16 14:55:24, Anshuman Khandual wrote: > [...] >>> Why we insist on __GFP_THISNODE ? >> >> AFAIU __GFP_THISNODE just overrides the given node to the policy >> nodemask in case the current

Re: MPOL_BIND on memory only nodes

2016-10-13 Thread Anshuman Khandual
On 10/12/2016 06:46 PM, Michal Hocko wrote: > On Wed 12-10-16 11:43:37, Michal Hocko wrote: >> On Wed 12-10-16 14:55:24, Anshuman Khandual wrote: > [...] >>> Why we insist on __GFP_THISNODE ? >> >> AFAIU __GFP_THISNODE just overrides the given node to the policy >> nodemask in case the current

Re: MPOL_BIND on memory only nodes

2016-10-13 Thread Michal Hocko
On Thu 13-10-16 11:24:59, Mel Gorman wrote: > On Wed, Oct 12, 2016 at 03:16:27PM +0200, Michal Hocko wrote: > > On Wed 12-10-16 11:43:37, Michal Hocko wrote: > > > On Wed 12-10-16 14:55:24, Anshuman Khandual wrote: > > [...] > > > > Why we insist on __GFP_THISNODE ? > > > > > > AFAIU

Re: MPOL_BIND on memory only nodes

2016-10-13 Thread Michal Hocko
On Thu 13-10-16 11:24:59, Mel Gorman wrote: > On Wed, Oct 12, 2016 at 03:16:27PM +0200, Michal Hocko wrote: > > On Wed 12-10-16 11:43:37, Michal Hocko wrote: > > > On Wed 12-10-16 14:55:24, Anshuman Khandual wrote: > > [...] > > > > Why we insist on __GFP_THISNODE ? > > > > > > AFAIU

Re: MPOL_BIND on memory only nodes

2016-10-13 Thread Anshuman Khandual
On 10/13/2016 03:37 PM, Michal Hocko wrote: > On Thu 13-10-16 15:24:54, Anshuman Khandual wrote: > [...] >> Which makes the function look like this. Even with these changes, MPOL_BIND >> is >> still going to pick up the local node's zonelist instead of the first node in >> policy->v.nodes

Re: MPOL_BIND on memory only nodes

2016-10-13 Thread Anshuman Khandual
On 10/13/2016 03:37 PM, Michal Hocko wrote: > On Thu 13-10-16 15:24:54, Anshuman Khandual wrote: > [...] >> Which makes the function look like this. Even with these changes, MPOL_BIND >> is >> still going to pick up the local node's zonelist instead of the first node in >> policy->v.nodes

Re: MPOL_BIND on memory only nodes

2016-10-13 Thread Mel Gorman
On Wed, Oct 12, 2016 at 03:16:27PM +0200, Michal Hocko wrote: > On Wed 12-10-16 11:43:37, Michal Hocko wrote: > > On Wed 12-10-16 14:55:24, Anshuman Khandual wrote: > [...] > > > Why we insist on __GFP_THISNODE ? > > > > AFAIU __GFP_THISNODE just overrides the given node to the policy > >

Re: MPOL_BIND on memory only nodes

2016-10-13 Thread Mel Gorman
On Wed, Oct 12, 2016 at 03:16:27PM +0200, Michal Hocko wrote: > On Wed 12-10-16 11:43:37, Michal Hocko wrote: > > On Wed 12-10-16 14:55:24, Anshuman Khandual wrote: > [...] > > > Why we insist on __GFP_THISNODE ? > > > > AFAIU __GFP_THISNODE just overrides the given node to the policy > >

Re: MPOL_BIND on memory only nodes

2016-10-13 Thread Michal Hocko
On Thu 13-10-16 15:24:54, Anshuman Khandual wrote: [...] > Which makes the function look like this. Even with these changes, MPOL_BIND is > still going to pick up the local node's zonelist instead of the first node in > policy->v.nodes nodemask. It completely ignores policy->v.nodes which it >

Re: MPOL_BIND on memory only nodes

2016-10-13 Thread Michal Hocko
On Thu 13-10-16 15:24:54, Anshuman Khandual wrote: [...] > Which makes the function look like this. Even with these changes, MPOL_BIND is > still going to pick up the local node's zonelist instead of the first node in > policy->v.nodes nodemask. It completely ignores policy->v.nodes which it >

Re: MPOL_BIND on memory only nodes

2016-10-12 Thread Michal Hocko
On Wed 12-10-16 11:43:37, Michal Hocko wrote: > On Wed 12-10-16 14:55:24, Anshuman Khandual wrote: [...] > > Why we insist on __GFP_THISNODE ? > > AFAIU __GFP_THISNODE just overrides the given node to the policy > nodemask in case the current node is not part of that node mask. In > other words

Re: MPOL_BIND on memory only nodes

2016-10-12 Thread Michal Hocko
On Wed 12-10-16 11:43:37, Michal Hocko wrote: > On Wed 12-10-16 14:55:24, Anshuman Khandual wrote: [...] > > Why we insist on __GFP_THISNODE ? > > AFAIU __GFP_THISNODE just overrides the given node to the policy > nodemask in case the current node is not part of that node mask. In > other words

Re: MPOL_BIND on memory only nodes

2016-10-12 Thread Michal Hocko
On Wed 12-10-16 16:08:48, Anshuman Khandual wrote: > On 10/12/2016 03:13 PM, Michal Hocko wrote: > > On Wed 12-10-16 14:55:24, Anshuman Khandual wrote: > >> Hi, > >> > >> We have the following function policy_zonelist() which selects a zonelist > >> during various allocation paths. With this,

Re: MPOL_BIND on memory only nodes

2016-10-12 Thread Michal Hocko
On Wed 12-10-16 16:08:48, Anshuman Khandual wrote: > On 10/12/2016 03:13 PM, Michal Hocko wrote: > > On Wed 12-10-16 14:55:24, Anshuman Khandual wrote: > >> Hi, > >> > >> We have the following function policy_zonelist() which selects a zonelist > >> during various allocation paths. With this,

Re: MPOL_BIND on memory only nodes

2016-10-12 Thread Anshuman Khandual
On 10/12/2016 03:13 PM, Michal Hocko wrote: > On Wed 12-10-16 14:55:24, Anshuman Khandual wrote: >> Hi, >> >> We have the following function policy_zonelist() which selects a zonelist >> during various allocation paths. With this, general user space allocations >> (IIUC might not have

Re: MPOL_BIND on memory only nodes

2016-10-12 Thread Anshuman Khandual
On 10/12/2016 03:13 PM, Michal Hocko wrote: > On Wed 12-10-16 14:55:24, Anshuman Khandual wrote: >> Hi, >> >> We have the following function policy_zonelist() which selects a zonelist >> during various allocation paths. With this, general user space allocations >> (IIUC might not have

Re: MPOL_BIND on memory only nodes

2016-10-12 Thread Michal Hocko
On Wed 12-10-16 14:55:24, Anshuman Khandual wrote: > Hi, > > We have the following function policy_zonelist() which selects a zonelist > during various allocation paths. With this, general user space allocations > (IIUC might not have __GFP_THISNODE) fails while trying to get memory from > a

Re: MPOL_BIND on memory only nodes

2016-10-12 Thread Michal Hocko
On Wed 12-10-16 14:55:24, Anshuman Khandual wrote: > Hi, > > We have the following function policy_zonelist() which selects a zonelist > during various allocation paths. With this, general user space allocations > (IIUC might not have __GFP_THISNODE) fails while trying to get memory from > a

MPOL_BIND on memory only nodes

2016-10-12 Thread Anshuman Khandual
Hi, We have the following function policy_zonelist() which selects a zonelist during various allocation paths. With this, general user space allocations (IIUC might not have __GFP_THISNODE) fails while trying to get memory from a memory only node without CPUs as the application runs some where

MPOL_BIND on memory only nodes

2016-10-12 Thread Anshuman Khandual
Hi, We have the following function policy_zonelist() which selects a zonelist during various allocation paths. With this, general user space allocations (IIUC might not have __GFP_THISNODE) fails while trying to get memory from a memory only node without CPUs as the application runs some where