From mboxrd@z Thu Jan 1 00:00:00 1970 From: Toshi Kani Subject: Re: [PATCH v2] libnvdimm, e820: fix numa node for e820-type-12 pmem ranges Date: Fri, 13 Nov 2015 10:42:18 -0700 Message-ID: <1447436538.21443.95.camel@hpe.com> References: <20151112175215.2462.69420.stgit@dwillia2-desk3.jf.intel.com> <1447433307.21443.90.camel@hpe.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: "linux-nvdimm@lists.01.org" , linux-fsdevel , "stable@vger.kernel.org" To: Dan Williams Return-path: Received: from g2t2353.austin.hp.com ([15.217.128.52]:21222 "EHLO g2t2353.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932717AbbKMRq3 (ORCPT ); Fri, 13 Nov 2015 12:46:29 -0500 In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, 2015-11-13 at 09:00 -0800, Dan Williams wrote: > On Fri, Nov 13, 2015 at 8:48 AM, Toshi Kani wrote: > > On Thu, 2015-11-12 at 09:53 -0800, Dan Williams wrote: > > > Rather than punt on the numa node for these e820 ranges try to find a > > > better answer with memory_add_physaddr_to_nid() when it is available. > > > : > > > +#ifdef CONFIG_MEMORY_HOTPLUG > > > +static int e820_range_to_nid(resource_size_t addr) > > > +{ > > > + return memory_add_physaddr_to_nid(addr); > > > +} > > > +#else > > > +static int e820_range_to_nid(resource_size_t addr) > > > +{ > > > + return NUMA_NO_NODE; > > > +} > > > +#endif > > > > "linux/memory_hotplug.h" defines as follows. > > > > #ifdef CONFIG_NUMA > > extern int memory_add_physaddr_to_nid(u64 start); > > #else > > static inline int memory_add_physaddr_to_nid(u64 start) > > { > > return 0; > > } > > #endif > > > > So, memory_add_physaddr_to_nid() should be defined with #ifdef CONFIG_NUMA. > > > > #ifdef CONFIG_MEMORY_HOTPLUG > > int memory_add_physaddr_to_nid(u64 start) > > { > > > > I thought so too, but 0day reported this: > > https://lists.01.org/pipermail/kbuild-all/2015-November/014618.html Oh, I see. "memory_hotplug.h" has #ifdef CONFIG_MEMORY_HOTPLUG before the memory_add_physaddr_to_nid() prototype definition... Thanks, -Toshi