> Hi, > > If a Linux system has discontingous memory, then normal practise > is to call add_memory_region() before calling bootmem allocator. I'm not sure why you are making this assumption. What architecture are you basing this on? On i386, add_memory_region is called to fill in the e820 structure based on the info gotten from the e820 (this is all done independent of discontigmem). This structure is then used to determine the max_pfn, max_low_pfn and family. This information is then used for setuping up the bootmem allocator and then later the zones. > In a thread on the net, there is a mention of using > CONFIG_DISCONTIGMEM for huge memory hole(gain of 2MB for 16MB > hole) Please send me a ptr to the thread you are referring to. > > How does one use CONFIG_DISCONTIGMEM? (is there any code > available) And how does it manage to save space against > add_memory_region? > I have been working on CONFIG_DISCONTIGMEM support i386 and have a patch that's available for download. Feel free to check this out. You can get it off of sourceforge at http://sourceforge.net/project/showfiles.php?group_id=8875&release_id=87263 Hope this helps, Pat -- Patricia Gaughen (gone@us.ibm.com) IBM Linux Technology Center http://www.ibm.com/linux/ltc/ -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/