Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754576AbbGXTyi (ORCPT ); Fri, 24 Jul 2015 15:54:38 -0400 Received: from mail-pd0-f180.google.com ([209.85.192.180]:35435 "EHLO mail-pd0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754487AbbGXTye (ORCPT ); Fri, 24 Jul 2015 15:54:34 -0400 Date: Fri, 24 Jul 2015 12:54:32 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Christoph Lameter cc: Vlastimil Babka , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Mel Gorman , Greg Thelen , "Aneesh Kumar K.V" , Pekka Enberg , Joonsoo Kim , Naoya Horiguchi Subject: Re: [RFC v2 4/4] mm: fallback for offline nodes in alloc_pages_node In-Reply-To: Message-ID: References: <1437749126-25867-1-git-send-email-vbabka@suse.cz> <1437749126-25867-4-git-send-email-vbabka@suse.cz> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 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: 1464 Lines: 41 On Fri, 24 Jul 2015, Christoph Lameter wrote: > On Fri, 24 Jul 2015, Vlastimil Babka wrote: > > > diff --git a/include/linux/gfp.h b/include/linux/gfp.h > > index 531c72d..104a027 100644 > > --- a/include/linux/gfp.h > > +++ b/include/linux/gfp.h > > @@ -321,8 +321,12 @@ static inline struct page *alloc_pages_node(int nid, gfp_t gfp_mask, > > unsigned int order) > > { > > /* Unknown node is current (or closest) node */ > > - if (nid == NUMA_NO_NODE) > > + if (nid == NUMA_NO_NODE) { > > nid = numa_mem_id(); > > + } else if (!node_online(nid)) { > > + VM_WARN_ON(!node_online(nid)); > > + nid = numa_mem_id(); > > + } > > I would think you would only want this for debugging purposes. The > overwhelming majority of hardware out there has no memory > onlining/offlining capability after all and this adds the overhead to each > call to alloc_pages_node. > > Make this dependo n CONFIG_VM_DEBUG or some such thing? > Yeah, the suggestion was for VM_WARN_ON() in the conditional, but the placement has changed somewhat because of the new __alloc_pages_node(). I think else if (VM_WARN_ON(!node_online(nid))) nid = numa_mem_id(); should be fine since it only triggers for CONFIG_DEBUG_VM. -- 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/