From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) by kanga.kvack.org (Postfix) with ESMTP id 0FA369003C7 for ; Thu, 23 Jul 2015 16:27:19 -0400 (EDT) Received: by pacan13 with SMTP id an13so1649308pac.1 for ; Thu, 23 Jul 2015 13:27:18 -0700 (PDT) Received: from mail-pd0-x234.google.com (mail-pd0-x234.google.com. [2607:f8b0:400e:c02::234]) by mx.google.com with ESMTPS id dn14si14567855pac.111.2015.07.23.13.27.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Jul 2015 13:27:18 -0700 (PDT) Received: by pdbbh15 with SMTP id bh15so1562449pdb.1 for ; Thu, 23 Jul 2015 13:27:17 -0700 (PDT) Date: Thu, 23 Jul 2015 13:27:15 -0700 (PDT) From: David Rientjes 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> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: Christoph Lameter 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 Thu, 23 Jul 2015, Christoph Lameter wrote: > > 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()? > I was concerned about any callers that were passing an offline node, not NUMA_NO_NODE, today. One of the alloc-node functions has a VM_BUG_ON() for it, the other silently calls node_zonelist() on it. I suppose the final alloc_pages_node() implementation could be if (nid == NUMA_NO_NODE || VM_WARN_ON(!node_online(nid))) nid = numa_mem_id(); VM_BUG_ON(nid < 0 || nid >= MAX_NUMNODES); return __alloc_pages(gfp_mask, order, node_zonelist(nid, gfp_mask)); though. -- 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