From mboxrd@z Thu Jan 1 00:00:00 1970 From: tgh Date: Wed, 04 Apr 2007 08:53:40 +0000 Subject: Re: question about memory-hotplug Message-Id: <46136794.7050108@ncic.ac.cn> List-Id: References: <4611BF4D.6020002@ncic.ac.cn> In-Reply-To: <4611BF4D.6020002@ncic.ac.cn> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org Thank you for your reply Yasunori Goto =E5=86=99=E9=81=93: > Hello. > > =20 >> hi >> I try to understand the memory_hotplug.c ,but I am confused about=20 >> the mechanism in it >> Does the mem_map is allocated when setup for all the memory page both=20 >> the existing and the hotplug , or does the mem_map is allocated=20 >> dynamically when a chip of memory is hotpluged ? >> if mem_map is allocated dynamically,does the mem_map is maintained in=20 >> the list or how to deal with it ? >> and if mem_map is allocated dynamically,does system need new node and=20 >> new zone structure to manage the dynamically-allocated memmap ,or not ? >> =20 > > Basically, memory hotplug code depends on sparsemem. So, I'll > recommend that you should see mm/sparse.c too. > In sparsemem code, mem_map is allocated dynamically, and=20 > its pointed by mem_section[] array. > =20 In the traditional linux without sparsemem, there are node-zone-memmap=20 mechanism for managing the physical memory,is it right? while in the sparsemem mechanism, what is the architure of=20 node-zone-memmap or node-zone-mem_section[]-mem_map like? and if the sparsemem is on , buddy still does its work in a mem_map as=20 before or does it work in a new way? and how does virt-to-phy macro (or something like it) work,when there=20 are a list of mem_map in the sparsemem system? > (However, x86-64 code has original code. IIRC, its memmap was allcated=20 > statically....) > =20 does x86-64 not surpport the memory-hotplug,or how does it achieve the=20 memory-hotplug ? > =20 >> if system need new node and new zone structure to manage the=20 >> dynamically-allocated memmap,does system have to be a NUMA-surpport one = >> or not? >> =20 > > Pgdat and zone can be allocated dynamically for NUMA system, > but memmap is not pointed by them if sparsemem is on. > =20 which structure points it ,mem_section[] does it? then what is the=20 architure of the node-zone-mem_section[]-mem_map like? > Thanks for your concern. :-) > > --- > Yasunori Goto=20 > > > > > =20 ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=DEVD= EV _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel