Re: [PATCH] mm: rename and document alloc_pages_exact_node
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Paolo Bonzini <pbonzini@xxxxxxxxxx>
- Subject: Re: [PATCH] mm: rename and document alloc_pages_exact_node
- From: David Rientjes <rientjes@xxxxxxxxxx>
- Date: Wed, 22 Jul 2015 14:44:03 -0700 (PDT)
- Cc: Vlastimil Babka <vbabka@xxxxxxx>, linux-mm@xxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, linux-ia64@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, cbe-oss-dev@xxxxxxxxxxxxxxxx, kvm@xxxxxxxxxxxxxxx, Mel Gorman <mgorman@xxxxxxx>, Greg Thelen <gthelen@xxxxxxxxxx>, "Aneesh Kumar K.V" <aneesh.kumar@xxxxxxxxxxxxxxxxxx>, Christoph Lameter <cl@xxxxxxxxx>, Pekka Enberg <penberg@xxxxxxxxxx>, Joonsoo Kim <iamjoonsoo.kim@xxxxxxx>, Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>, Fenghua Yu <fenghua.yu@xxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>, Paul Mackerras <paulus@xxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Gleb Natapov <gleb@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>
- In-reply-to: <55AF7F28.2020504@redhat.com>
- List-id: <linux-ia64.vger.kernel.org>
- References: <1437486951-19898-1-git-send-email-vbabka@suse.cz> <55AF7F28.2020504@redhat.com>
- User-agent: Alpine 2.10 (DEB 1266 2009-07-14)
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 *vmcs;
> >
> > - pages = alloc_pages_exact_node(node, GFP_KERNEL, vmcs_config.order);
> > + pages = alloc_pages_prefer_node(node, GFP_KERNEL, vmcs_config.order);
> > if (!pages)
> > return NULL;
> > vmcs = page_address(pages);
>
> Even though there's a pretty strong preference for the "right" node,
> things can work if the node is the wrong one. The order is always zero
> in practice, so the allocation should succeed.
>
You're code is fine both before and after the patch since __GFP_THISNODE
isn't set. The allocation will eventually succeed but, as you said, may
be from remote memory (and the success of allocating on node may be
influenced by the global setting of zone_reclaim_mode).
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]