From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qg0-f49.google.com (mail-qg0-f49.google.com [209.85.192.49]) by kanga.kvack.org (Postfix) with ESMTP id B35DC6B025F for ; Thu, 23 Jul 2015 10:11:59 -0400 (EDT) Received: by qged69 with SMTP id d69so88694128qge.0 for ; Thu, 23 Jul 2015 07:11:59 -0700 (PDT) Received: from resqmta-ch2-05v.sys.comcast.net (resqmta-ch2-05v.sys.comcast.net. [2001:558:fe21:29:69:252:207:37]) by mx.google.com with ESMTPS id a74si5940687qgf.30.2015.07.23.07.11.58 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 23 Jul 2015 07:11:58 -0700 (PDT) Date: Thu, 23 Jul 2015 09:11:53 -0500 (CDT) From: Christoph Lameter 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: owner-linux-mm@kvack.org List-ID: 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 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, 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: email@kvack.org