From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yasunori Goto Date: Wed, 04 Apr 2007 10:29:37 +0000 Subject: Re: question about memory-hotplug Message-Id: <20070404181250.0205.Y-GOTO@jp.fujitsu.com> 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="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org > In the traditional linux without sparsemem, there are node-zone-memmap=20 > mechanism for managing the physical memory,is it right? Yes. > while in the sparsemem mechanism, what is the architure of=20 > node-zone-memmap or node-zone-mem_section[]-mem_map like? mem_section[] is "static array" which is defined in sparse.c. So, no pointer is necessary to point mem_section array. Its index can be found by only pfn like ((pfn >> PFN_SECTION_SHIFT)). Each mem_section has pointer of mem_map. In addition, each page->flags has area for saving mem_section's index. page_to_section() is (page->flags >> SECTIONS_PGSHIFT) & SECTIONS_MASK). Tracing __pfn_to_page() and __page_to_pfn in=20 include/asm-generic/memory_model.h will be good answer=20 for your understanding. > 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? 2.6.10 or older kernel has bitmaps to manage buddy page. Current one doesn't have it. Its information is saved in page->private. Others are same. 1 section size is bigger than MAX_ORDER. So, current buddy system doensn't concern about section size.=20 This means memory hotplug unit size is section size. (At least now) > 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? >=20 > > (However, x86-64 code has original code. IIRC, its memmap was allcated = > > statically....) > > =20 > does x86-64 not surpport the memory-hotplug,or how does it achieve the=20 > memory-hotplug ? x86-64 supports both of sparse and non sparse. It is seleced by kernel config option. Bye. --=20 Yasunori Goto=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