From mboxrd@z Thu Jan 1 00:00:00 1970 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 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? From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ig0-f173.google.com (mail-ig0-f173.google.com [209.85.213.173]) by kanga.kvack.org (Postfix) with ESMTP id E4F756B0038 for ; Fri, 24 Jul 2015 11:48:41 -0400 (EDT) Received: by igr7 with SMTP id 7so19922421igr.0 for ; Fri, 24 Jul 2015 08:48:41 -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 e16si2577567igo.1.2015.07.24.08.48.41 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 24 Jul 2015 08:48:41 -0700 (PDT) Date: Fri, 24 Jul 2015 10:48:39 -0500 (CDT) From: Christoph Lameter 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: owner-linux-mm@kvack.org List-ID: 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 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, 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