From: David Rientjes <rientjes@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Vlastimil Babka <vbabka@suse.cz>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
cbe-oss-dev@lists.ozlabs.org, kvm@vger.kernel.org,
Mel Gorman <mgorman@suse.de>, Greg Thelen <gthelen@google.com>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
Christoph Lameter <cl@linux.com>,
Pekka Enberg <penberg@kernel.org>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
Tony Luck <tony.luck@intel.com>,
Fenghua Yu <fenghua.yu@intel.com>, Arnd Bergmann <arnd@arndb.de>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Gleb Natapov <gleb@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>
Subject: Re: [PATCH] mm: rename and document alloc_pages_exact_node
Date: Wed, 22 Jul 2015 14:44:03 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.10.1507221442540.21468@chino.kir.corp.google.com> (raw)
In-Reply-To: <55AF7F28.2020504@redhat.com>
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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2015-07-22 21:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-21 13:55 Vlastimil Babka
2015-07-21 14:05 ` Christoph Lameter
2015-07-21 14:14 ` Robin Holt
2015-07-21 21:31 ` David Rientjes
2015-07-22 11:32 ` Vlastimil Babka
2015-07-22 21:52 ` David Rientjes
2015-07-23 14:11 ` Christoph Lameter
2015-07-23 20:27 ` David Rientjes
2015-07-24 14:52 ` Vlastimil Babka
2015-07-22 1:23 ` Michael Ellerman
2015-07-22 11:31 ` Paolo Bonzini
2015-07-22 21:44 ` David Rientjes [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.10.1507221442540.21468@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=arnd@arndb.de \
--cc=benh@kernel.crashing.org \
--cc=cbe-oss-dev@lists.ozlabs.org \
--cc=cl@linux.com \
--cc=fenghua.yu@intel.com \
--cc=gleb@kernel.org \
--cc=gthelen@google.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=kvm@vger.kernel.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=mpe@ellerman.id.au \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=paulus@samba.org \
--cc=pbonzini@redhat.com \
--cc=penberg@kernel.org \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=vbabka@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox