Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753448AbbGXPso (ORCPT ); Fri, 24 Jul 2015 11:48:44 -0400 Received: from resqmta-ch2-09v.sys.comcast.net ([69.252.207.41]:38604 "EHLO resqmta-ch2-09v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751897AbbGXPsm (ORCPT ); Fri, 24 Jul 2015 11:48:42 -0400 Date: Fri, 24 Jul 2015 10:48:39 -0500 (CDT) From: Christoph Lameter X-X-Sender: cl@east.gentwo.org To: Vlastimil Babka cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Mel Gorman , David Rientjes , 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: <1437749126-25867-4-git-send-email-vbabka@suse.cz> Message-ID: References: <1437749126-25867-1-git-send-email-vbabka@suse.cz> <1437749126-25867-4-git-send-email-vbabka@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: 1088 Lines: 30 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? -- 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/