Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752748AbbFXMNs (ORCPT ); Wed, 24 Jun 2015 08:13:48 -0400 Received: from e39.co.us.ibm.com ([32.97.110.160]:55975 "EHLO e39.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750994AbbFXMNl (ORCPT ); Wed, 24 Jun 2015 08:13:41 -0400 X-Helo: d01dlp01.pok.ibm.com X-MailFrom: nfont@linux.vnet.ibm.com X-RcptTo: linux-kernel@vger.kernel.org Message-ID: <558A9EF0.3010305@linux.vnet.ibm.com> Date: Wed, 24 Jun 2015 07:13:36 -0500 From: Nathan Fontenot User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Bharata B Rao , linuxppc-dev , "linux-kernel@vger.kernel.org" CC: Paul Mackerras , Anton Blanchard Subject: Re: powerpc,numa: Memory hotplug to memory-less nodes ? References: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15062412-0033-0000-0000-000004F3B179 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1545 Lines: 44 On 06/23/2015 11:01 PM, Bharata B Rao wrote: > So will it be correct to say that memory hotplug to memory-less node > isn't supported by PowerPC kernel ? Should I enforce the same in QEMU > for PowerKVM ? > I'm not sure if that is correct. It appears that we initialize all online nodes, even those without spanned_pages, at boot time. This occurs in setup_node_data() called from initmem_init(). Looking at this I would think that we could add memory to any online node even if it does not have any spanned_pages. I think an interesting test we be to check for the node being online instead of checking to see if it has any memory. -Nathan > On Mon, Jun 22, 2015 at 10:18 AM, Bharata B Rao wrote: >> Hi, >> >> While developing memory hotplug support in QEMU for PoweKVM, I >> realized that guest kernel has specific checks to prevent hot addition >> of memory to a memory-less node. >> >> I am referring to arch/powerpc/mm/numa.c:hot_add_scn_to_nid() which >> has explicit checks to ensure that it returns a nid that has some some >> memory (NODE_DATA(nid)->node_spanned_pages) even when user wants to >> hotplug to a node that currently has zero memory. >> >> Is this limitation by design ? >> >> Regards, >> Bharata. >> -- >> http://raobharata.wordpress.com/ > > > -- 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/