On Fri, 9 Jul 2010 12:35:17 +0530 naren.mehra@xxxxxxxxx wrote: > Thanks to you guys, I am now getting a grip on the sparsemem code. > While going through the code, I came across several instances of the following: > #ifndef CONFIG_NEED_MULTIPLE_NODES > . > <some code> > . > #endif > > Now, it seems like this configuration option is used in case there are > multiple nodes in a system. > But its linked/depends on NUMA/discontigmem. > > It could be possible that we have multiple nodes in a UMA system. > How can sparsemem handle such cases ?? > sparsemem can be used both in UMA/NUMA case. IOW, sparsemem is for handling memmap(array of struct page) for flexible memory layout, and not for NUMA. Then, NUMA/MULTIPLENODE and SPARSEMEM has no relationship, basically. "nid" is recorded just for detecting the nearest node for allocating mem_map. (And some 32bit arch recoreds some information of 'nid'.) So, you shouldn't be suffer from an illusion of sparsemem when you think about NUMA/MULTIPLENODE. please visit free_area_init_nodes(), and add_active_range(), remove_actitve_range(). They are for MULTIPLENODES. Thanks, -Kame -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxxx For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>