Re: [PATCH] mm: rename and document alloc_pages_exact_node

2015-07-24 Thread Vlastimil Babka
On 07/23/2015 10:27 PM, David Rientjes wrote: On Thu, 23 Jul 2015, Christoph Lameter wrote: The only possible downside would be existing users of alloc_pages_node() that are calling it with an offline node. Since it's a VM_BUG_ON() that would catch that, I think it should be changed to a

Re: [PATCH] mm: rename and document alloc_pages_exact_node

2015-07-24 Thread Vlastimil Babka
On 07/23/2015 10:27 PM, David Rientjes wrote: On Thu, 23 Jul 2015, Christoph Lameter wrote: The only possible downside would be existing users of alloc_pages_node() that are calling it with an offline node. Since it's a VM_BUG_ON() that would catch that, I think it should be changed to a

Re: [PATCH] mm: rename and document alloc_pages_exact_node

2015-07-23 Thread David Rientjes
On Thu, 23 Jul 2015, Christoph Lameter wrote: > > The only possible downside would be existing users of > > alloc_pages_node() that are calling it with an offline node. Since it's a > > VM_BUG_ON() that would catch that, I think it should be changed to a > > VM_WARN_ON() and eventually fixed up

Re: [PATCH] mm: rename and document alloc_pages_exact_node

2015-07-23 Thread Christoph Lameter
On Wed, 22 Jul 2015, David Rientjes wrote: > Eek, yeah, that does look bad. I'm not even sure the > > if (nid < 0) > nid = numa_node_id(); > > is correct; I think this should be comparing to NUMA_NO_NODE rather than > all negative numbers, otherwise we silently ignore

Re: [PATCH] mm: rename and document alloc_pages_exact_node

2015-07-23 Thread David Rientjes
On Thu, 23 Jul 2015, Christoph Lameter wrote: The only possible downside would be existing users of alloc_pages_node() that are calling it with an offline node. Since it's a VM_BUG_ON() that would catch that, I think it should be changed to a VM_WARN_ON() and eventually fixed up because

Re: [PATCH] mm: rename and document alloc_pages_exact_node

2015-07-23 Thread Christoph Lameter
On Wed, 22 Jul 2015, David Rientjes wrote: Eek, yeah, that does look bad. I'm not even sure the if (nid 0) nid = numa_node_id(); is correct; I think this should be comparing to NUMA_NO_NODE rather than all negative numbers, otherwise we silently ignore overflow and

Re: [PATCH] mm: rename and document alloc_pages_exact_node

2015-07-22 Thread David Rientjes
On Wed, 22 Jul 2015, Vlastimil Babka wrote: > > alloc_pages_exact_node(), as you said, connotates that the allocation will > > take place on that node or will fail. So why not go beyond this patch and > > actually make alloc_pages_exact_node() set __GFP_THISNODE and then call > > into a new

Re: [PATCH] mm: rename and document alloc_pages_exact_node

2015-07-22 Thread David Rientjes
On Wed, 22 Jul 2015, Paolo Bonzini wrote: > > diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c > > index 2d73807..a8723a8 100644 > > --- a/arch/x86/kvm/vmx.c > > +++ b/arch/x86/kvm/vmx.c > > @@ -3158,7 +3158,7 @@ static struct vmcs *alloc_vmcs_cpu(int cpu) > > struct page *pages; > >

Re: [PATCH] mm: rename and document alloc_pages_exact_node

2015-07-22 Thread Vlastimil Babka
On 07/21/2015 11:31 PM, David Rientjes wrote: > On Tue, 21 Jul 2015, Vlastimil Babka wrote: > >> The function alloc_pages_exact_node() was introduced in 6484eb3e2a81 ("page >> allocator: do not check NUMA node ID when the caller knows the node is >> valid") >> as an optimized variant of

Re: [PATCH] mm: rename and document alloc_pages_exact_node

2015-07-22 Thread Paolo Bonzini
On 21/07/2015 15:55, Vlastimil Babka wrote: > diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c > index 2d73807..a8723a8 100644 > --- a/arch/x86/kvm/vmx.c > +++ b/arch/x86/kvm/vmx.c > @@ -3158,7 +3158,7 @@ static struct vmcs *alloc_vmcs_cpu(int cpu) > struct page *pages; > struct

Re: [PATCH] mm: rename and document alloc_pages_exact_node

2015-07-22 Thread Paolo Bonzini
On 21/07/2015 15:55, Vlastimil Babka wrote: diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 2d73807..a8723a8 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -3158,7 +3158,7 @@ static struct vmcs *alloc_vmcs_cpu(int cpu) struct page *pages; struct vmcs

Re: [PATCH] mm: rename and document alloc_pages_exact_node

2015-07-22 Thread Vlastimil Babka
On 07/21/2015 11:31 PM, David Rientjes wrote: On Tue, 21 Jul 2015, Vlastimil Babka wrote: The function alloc_pages_exact_node() was introduced in 6484eb3e2a81 (page allocator: do not check NUMA node ID when the caller knows the node is valid) as an optimized variant of alloc_pages_node(),

Re: [PATCH] mm: rename and document alloc_pages_exact_node

2015-07-22 Thread David Rientjes
On Wed, 22 Jul 2015, Paolo Bonzini wrote: diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 2d73807..a8723a8 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -3158,7 +3158,7 @@ static struct vmcs *alloc_vmcs_cpu(int cpu) struct page *pages; struct vmcs

Re: [PATCH] mm: rename and document alloc_pages_exact_node

2015-07-22 Thread David Rientjes
On Wed, 22 Jul 2015, Vlastimil Babka wrote: alloc_pages_exact_node(), as you said, connotates that the allocation will take place on that node or will fail. So why not go beyond this patch and actually make alloc_pages_exact_node() set __GFP_THISNODE and then call into a new

Re: [PATCH] mm: rename and document alloc_pages_exact_node

2015-07-21 Thread Michael Ellerman
On Tue, 2015-07-21 at 15:55 +0200, Vlastimil Babka wrote: > The function alloc_pages_exact_node() was introduced in 6484eb3e2a81 ("page > allocator: do not check NUMA node ID when the caller knows the node is valid") > as an optimized variant of alloc_pages_node(), that doesn't allow the node id >

Re: [PATCH] mm: rename and document alloc_pages_exact_node

2015-07-21 Thread David Rientjes
On Tue, 21 Jul 2015, Vlastimil Babka wrote: > The function alloc_pages_exact_node() was introduced in 6484eb3e2a81 ("page > allocator: do not check NUMA node ID when the caller knows the node is valid") > as an optimized variant of alloc_pages_node(), that doesn't allow the node id > to be -1.

Re: [PATCH] mm: rename and document alloc_pages_exact_node

2015-07-21 Thread Robin Holt
On Tue, Jul 21, 2015 at 8:55 AM, Vlastimil Babka wrote: > The function alloc_pages_exact_node() was introduced in 6484eb3e2a81 ("page > allocator: do not check NUMA node ID when the caller knows the node is valid") > as an optimized variant of alloc_pages_node(), that doesn't allow the node id >

Re: [PATCH] mm: rename and document alloc_pages_exact_node

2015-07-21 Thread Christoph Lameter
On Tue, 21 Jul 2015, Vlastimil Babka wrote: > The function alloc_pages_exact_node() was introduced in 6484eb3e2a81 ("page > allocator: do not check NUMA node ID when the caller knows the node is valid") > as an optimized variant of alloc_pages_node(), that doesn't allow the node id > to be -1.

[PATCH] mm: rename and document alloc_pages_exact_node

2015-07-21 Thread Vlastimil Babka
The function alloc_pages_exact_node() was introduced in 6484eb3e2a81 ("page allocator: do not check NUMA node ID when the caller knows the node is valid") as an optimized variant of alloc_pages_node(), that doesn't allow the node id to be -1. Unfortunately the name of the function can easily

Re: [PATCH] mm: rename and document alloc_pages_exact_node

2015-07-21 Thread Michael Ellerman
On Tue, 2015-07-21 at 15:55 +0200, Vlastimil Babka wrote: The function alloc_pages_exact_node() was introduced in 6484eb3e2a81 (page allocator: do not check NUMA node ID when the caller knows the node is valid) as an optimized variant of alloc_pages_node(), that doesn't allow the node id to be

Re: [PATCH] mm: rename and document alloc_pages_exact_node

2015-07-21 Thread David Rientjes
On Tue, 21 Jul 2015, Vlastimil Babka wrote: The function alloc_pages_exact_node() was introduced in 6484eb3e2a81 (page allocator: do not check NUMA node ID when the caller knows the node is valid) as an optimized variant of alloc_pages_node(), that doesn't allow the node id to be -1.

[PATCH] mm: rename and document alloc_pages_exact_node

2015-07-21 Thread Vlastimil Babka
The function alloc_pages_exact_node() was introduced in 6484eb3e2a81 (page allocator: do not check NUMA node ID when the caller knows the node is valid) as an optimized variant of alloc_pages_node(), that doesn't allow the node id to be -1. Unfortunately the name of the function can easily suggest

Re: [PATCH] mm: rename and document alloc_pages_exact_node

2015-07-21 Thread Christoph Lameter
On Tue, 21 Jul 2015, Vlastimil Babka wrote: The function alloc_pages_exact_node() was introduced in 6484eb3e2a81 (page allocator: do not check NUMA node ID when the caller knows the node is valid) as an optimized variant of alloc_pages_node(), that doesn't allow the node id to be -1.

Re: [PATCH] mm: rename and document alloc_pages_exact_node

2015-07-21 Thread Robin Holt
On Tue, Jul 21, 2015 at 8:55 AM, Vlastimil Babka vba...@suse.cz wrote: The function alloc_pages_exact_node() was introduced in 6484eb3e2a81 (page allocator: do not check NUMA node ID when the caller knows the node is valid) as an optimized variant of alloc_pages_node(), that doesn't allow the