From: Yasunori Goto Date: Thu, 05 Apr 2007 06:07:22 +0000 Subject: Re: question about memory-hotplug Message-Id: <20070405114929.4246.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 > > Yes there are. Zone is still necessary for page reclaim. > > Node and zonelist are used for NUMA system. > > =20 > Buddy allocate memory with the mem_section[] and without zone-aware=20 > ,while it reclaim memory with zone,is it right? > I am confused about the functions of the zone and node in the system=20 > ,when the sparsemem is on Basically, mem_section[] is for pointer to mem_map. It doesn't count how many pages are allocated/freed in its section.=20 This just divides mem_map[] as discontiguous. Buddy allocater must know 2 things.=20 First is the address of buddy page against target page. It can be calculated as --relative offset-- from target page. (See: __page_find_buddy()). So, buddy allocater doesn't know mem_map is=20 discontigous or not. From this view point, Buddy allocater doen't concern about any zone, node, nor mem_section. Second is free_list for managing free pages. Its list is connected to zone. So, buddy allocator must know about only zone's address and target page's address. It doesn't know mem_map is contiguous or not too. Current zone is used for manage freed/active/inactive pages. Zone has link lists and counters of their pages. There is no assumption that zone is contiguous from this view point. Even if there is a memory hole in zone, zone can work. Just memmap array has assumption that physicall memory is contigous. Index of memmap is decided by Page Frame Number. If there is big memory hole in memory, many space of it will be wasted. This is why mem_section is used for sparse mem. Node is for NUMA node now. Each node have each pgdat. This is unit for managing memory areas which has different access speed. Kernel can use nearest memory from cpu by finding appropriate pgdat.=20 Old DISCONTIG_MEM defines one pgdat for one contigous memory area. But many people dislike now. If system has too much memory area=20 which area is small size, too much pgdats and big zonelists are big cause of system load. 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