From mboxrd@z Thu Jan 1 00:00:00 1970 From: tgh Date: Thu, 05 Apr 2007 08:50:14 +0000 Subject: Re: question about memory-hotplug Message-Id: <4614B846.7070300@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 Thank you Yasunori Goto =E5=86=99=E9=81=93: >>> Yes there are. Zone is still necessary for page reclaim. >>> Node and zonelist are used for NUMA system. >>> =20 >>> =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 >> =20 > > 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 ------------------------------------------------------------------------- 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