HI, Attached is the thread I had picked up and that I was talking about. Incidentally I too am using MIPS and have the same meory map as mentioned below. ----------- From here ----------------- On Tue, Oct 30, 2001 at 06:11:43PM +0800, Green wrote: >I am porting Linux to R3912. > >There are two memory block on my target board. > >One is 16MB from 0x8000 0000 to 0x8100 0000. > >The other one is 16MB from 0x8200 0000 to 0x8300 0000. > >But I found kernel just managed the first memory block. > >How could I modify the kernel to support 32MB discontinuous >memory? > >Now I am trying to add entries to page table. >It will halt at decompressing ramdisk. > >Has anyone resolve this kind of problem before? The kernel support this type of memory architecture if you enable CONFIG_DISCONTIGMEM. One machine which uses this feature is the Origin, grep in arch/mips64 for CONFIG_DISCONTIGMEM. There are also several ARM system using it. As support for CONFIG_DISCONTIGMEM is less than perfect you should check if your system allows for reconfiguration of memory as a single physically contiguous chunk. Don't use add_memory_region() in this case; that code only works well for small holes in memory address space. Your holes are fairly large so memory management would waste about 2mb if you would not use CONFIG_DISCONTIGMEM. Ralf ------------- Till here ----------- Thanks Raghav On Thu, 09 May 2002 Patricia Gaughen wrote : > > > 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/ > > _________________________________________________________ Click below to visit monsterindia.com and review jobs in India or Abroad http://monsterindia.rediff.com/jobs -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/