Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934197AbbGVLcA (ORCPT ); Wed, 22 Jul 2015 07:32:00 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:36292 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933788AbbGVLb6 (ORCPT ); Wed, 22 Jul 2015 07:31:58 -0400 Subject: Re: [PATCH] mm: rename and document alloc_pages_exact_node To: Vlastimil Babka , linux-mm@kvack.org References: <1437486951-19898-1-git-send-email-vbabka@suse.cz> Cc: linux-kernel@vger.kernel.org, Andrew Morton , linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, cbe-oss-dev@lists.ozlabs.org, kvm@vger.kernel.org, Mel Gorman , David Rientjes , Greg Thelen , "Aneesh Kumar K.V" , Christoph Lameter , Pekka Enberg , Joonsoo Kim , Naoya Horiguchi , Tony Luck , Fenghua Yu , Arnd Bergmann , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Gleb Natapov , Thomas Gleixner , Ingo Molnar From: Paolo Bonzini Message-ID: <55AF7F28.2020504@redhat.com> Date: Wed, 22 Jul 2015 13:31:52 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 MIME-Version: 1.0 In-Reply-To: <1437486951-19898-1-git-send-email-vbabka@suse.cz> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 960 Lines: 27 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 *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. Paolo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/