Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753264AbbGWOMM (ORCPT ); Thu, 23 Jul 2015 10:12:12 -0400 Received: from resqmta-ch2-11v.sys.comcast.net ([69.252.207.43]:36450 "EHLO resqmta-ch2-11v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752770AbbGWOL6 (ORCPT ); Thu, 23 Jul 2015 10:11:58 -0400 Date: Thu, 23 Jul 2015 09:11:53 -0500 (CDT) From: Christoph Lameter X-X-Sender: cl@east.gentwo.org To: David Rientjes cc: Vlastimil Babka , linux-mm@kvack.org, 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 , Greg Thelen , "Aneesh Kumar K.V" , Pekka Enberg , Joonsoo Kim , Naoya Horiguchi , Tony Luck , Fenghua Yu , Arnd Bergmann , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Gleb Natapov , Paolo Bonzini , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Cliff Whickman , Robin Holt Subject: Re: [PATCH] mm: rename and document alloc_pages_exact_node In-Reply-To: Message-ID: References: <1437486951-19898-1-git-send-email-vbabka@suse.cz> <55AF7F64.1040602@suse.cz> Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1040 Lines: 27 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 nobody > ever knows. Comparing to NUMA_NO_NODE would be better. Also use numa_mem_id() instead to support memoryless nodes better? > 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 it's nonsensical. > VM_BUG_ON() here should be avoided. The offline node thing could be addresses by using numa_mem_id()? -- 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/