Thank you for your reply Thank you Yasunori Goto 写道: >>> Yes there are. Zone is still necessary for page reclaim. >>> Node and zonelist are used for NUMA system. >>> >>> >> Buddy allocate memory with the mem_section[] and without zone-aware >> ,while it reclaim memory with zone,is it right? >> I am confused about the functions of the zone and node in the system >> ,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. > This just divides mem_map[] as discontiguous. > > Buddy allocater must know 2 things. > > 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 > 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. > > Old DISCONTIG_MEM defines one pgdat for one contigous memory area. > But many people dislike now. If system has too much memory area > which area is small size, too much pgdats and big zonelists > are big cause of system load. > > > Bye. > > ------------------------------------------------------------------------- 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=join.php&p=sourceforge&CIDVDEV _______________________________________________ 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