On Tue, Jul 6, 2010 at 2:11 PM, <naren.mehra@xxxxxxxxx> wrote: > Hi, > > I am trying to understand the sparsemem implementation in linux for > NUMA/multiple node systems. > > From the available documentation and the sparsemem patches, I am able > to make out that sparsemem divides memory into different sections and > if the whole section contains a hole then its marked as invalid > section and if some pages in a section form a hole then those pages > are marked reserved. My issue is that this classification, I am not > able to map it to the code. > > e.g. from arch specific code, we call memory_present() to prepare a > list of sections in a particular node. but unable to find where > exactly some sections are marked invalid because they contain a hole. On ARM's sparsememory, static void arm_memory_present(struct meminfo *mi) { int i; for_each_bank(i, mi) { struct membank *bank = &mi->bank[i]; memory_present(0, bank_pfn_start(bank), bank_pfn_end(bank)); } } It just mark _bank_ which has memory with SECTION_MARKED_PRESENT. Otherwise, Hole. > > Can somebody tell me where in the code are we identifying sections as > invalid and where we are marking pages as reserved. Do you mean memmap_init_zone? -- Kind regards, Minchan Kim -- 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