Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754467AbZGBBK0 (ORCPT ); Wed, 1 Jul 2009 21:10:26 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752741AbZGBBKS (ORCPT ); Wed, 1 Jul 2009 21:10:18 -0400 Received: from mga02.intel.com ([134.134.136.20]:54438 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752739AbZGBBKR (ORCPT ); Wed, 1 Jul 2009 21:10:17 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.42,329,1243839600"; d="scan'208";a="529544703" Subject: Re: + memory-hotplug-alloc-page-from-other-node-in-memory-online.patch added to -mm tree From: yakui To: Christoph Lameter Cc: "Li, Shaohua" , "akpm@linux-foundation.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "mel@csn.ul.ie" In-Reply-To: References: <200906291949.n5TJnuov028806@imap1.linux-foundation.org> <20090630004735.GA21254@sli10-desk.sh.intel.com> <20090701025558.GA28524@sli10-desk.sh.intel.com> <1246419543.18688.14.camel@localhost.localdomain> Content-Type: text/plain Date: Thu, 02 Jul 2009 09:11:13 +0800 Message-Id: <1246497073.18688.28.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.22.1 (2.22.1-2.fc9) Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1861 Lines: 40 On Thu, 2009-07-02 at 01:22 +0800, Christoph Lameter wrote: > On Wed, 1 Jul 2009, yakui wrote: > > > If we can't allocate memory from other node when there is no memory on > > this node, we will have to do something like the bootmem allocator. > > After the memory page is added to the system memory, we will have to > > free the memory space used by the memory allocator. At the same time we > > will have to assure that the hot-plugged memory exists physically. > > The bootmem allocator must stick around it seems. Its more like a node > bootstrap allocator then. > > Maybe we can generalize that. The bootstrap allocator may only need to be > able boot one node (which simplifies design). During system bringup only > the boot node is brought up. > > Then the other nodes are hotplugged later all in turn using the bootstrap > allocator for their node setup? Your idea looks fragrant. But it seems that it is difficult to realize. In the boot phase the bootmem allocator is initialized. And after the page buddy mechanism is enabled, the memory space used by bootmem allocator will be freed. If we also do the similar thing for the hotplugged node, how and when to free the memory space used by the bootstrap allocator? It seems that we will have to wait before all the memory sections are onlined for this hotplugged node. And before all the memory sections are onlined, the bootstrap allocator and buddy page allocator will co-exist. thanks. > > There are a couple of things where one would want to spread out memory > across the nodes at boot time. How would node hotplugging handle that > situation? -- 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/