* Any examples / docs for getting SPARSEMEM to work?
@ 2006-05-18 17:58 Chad Reese
2006-05-18 20:23 ` Matt Porter
2006-06-13 7:01 ` Franck Bui-Huu
0 siblings, 2 replies; 3+ messages in thread
From: Chad Reese @ 2006-05-18 17:58 UTC (permalink / raw)
To: linux-mips
Hello All,
I've spent the last few days trying to get SPARSEMEM to work on a 64bit Mips
kernel. The processor I'm using has large wholes in its memory map.
Memory layout:
0 - 0x10000000 First 256MB
0x410000000 - 0x420000000 Second 256MB
0x20000000 - ? The rest of memory
Up until now I've used the flat memory model and not mapped the 2nd 256MB. This
is rather wasteful for boards with 512MB of memory. SPARSEMEM look like what I
need, but I've been unable to get it working. My attempts to configure it always
end with sparse_index_alloc calling alloc_bootmem_node which fails to allocate
4KB. In prom_init I've added memory using add_memory_region.
Are there any reasonably easy to follow implementations of sparsemem? I figure
I'm missing something very basic, but perusal of Mips and the other
architectures haven't helped much.
My baseline is linux-mips 2.6.14.
Any help would be appreciated,
Chad
--
Chad Reese <kreese@caviumnetworks.com>
Cavium Networks
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Any examples / docs for getting SPARSEMEM to work?
2006-05-18 17:58 Any examples / docs for getting SPARSEMEM to work? Chad Reese
@ 2006-05-18 20:23 ` Matt Porter
2006-06-13 7:01 ` Franck Bui-Huu
1 sibling, 0 replies; 3+ messages in thread
From: Matt Porter @ 2006-05-18 20:23 UTC (permalink / raw)
To: Chad Reese; +Cc: linux-mips
On Thu, May 18, 2006 at 10:58:48AM -0700, Chad Reese wrote:
> Hello All,
>
> I've spent the last few days trying to get SPARSEMEM to work on a 64bit Mips
> kernel. The processor I'm using has large wholes in its memory map.
>
> Memory layout:
> 0 - 0x10000000 First 256MB
> 0x410000000 - 0x420000000 Second 256MB
> 0x20000000 - ? The rest of memory
>
> Up until now I've used the flat memory model and not mapped the 2nd 256MB. This
> is rather wasteful for boards with 512MB of memory. SPARSEMEM look like what I
Yep, SPARSEMEM is what you want. BTW, doublecheck your line wrap
settings on your mailer...they're messed up.
> need, but I've been unable to get it working. My attempts to configure it always
> end with sparse_index_alloc calling alloc_bootmem_node which fails to allocate
> 4KB. In prom_init I've added memory using add_memory_region.
But where have you added everything else? Where are you registering the
sparsemem and initializing it? It sounds like you are either getting
an invalid node passed into the alloc_bootmem_node or you are calling
the bootmem allocator much later and it is failing.
> Are there any reasonably easy to follow implementations of sparsemem? I figure
None that I know of, excpet for the i386, ia64, and powerpc
implementations. i386 is fairly straightforward except for all
the EFI magic.
> I'm missing something very basic, but perusal of Mips and the other
> architectures haven't helped much.
>
> My baseline is linux-mips 2.6.14.
>
> Any help would be appreciated,
I suggest working back from your bootmem allocation failure to
understand why that is failing.
-Matt
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Any examples / docs for getting SPARSEMEM to work?
2006-05-18 17:58 Any examples / docs for getting SPARSEMEM to work? Chad Reese
2006-05-18 20:23 ` Matt Porter
@ 2006-06-13 7:01 ` Franck Bui-Huu
1 sibling, 0 replies; 3+ messages in thread
From: Franck Bui-Huu @ 2006-06-13 7:01 UTC (permalink / raw)
To: Chad Reese; +Cc: linux-mips
Hi,
2006/5/18, Chad Reese <kreese@caviumnetworks.com>:
> Hello All,
>
> I've spent the last few days trying to get SPARSEMEM to work on a 64bit Mips
> kernel. The processor I'm using has large wholes in its memory map.
>
> Memory layout:
> 0 - 0x10000000 First 256MB
> 0x410000000 - 0x420000000 Second 256MB
Sorry for the delay, I didn't notice your post before...
Just out of curiosity, what value for PAGE_OFFSET do you use ? In
other word how do you convert a physical address into a virtual one if
you use these two memories ?
Could you show us the virtual address ranges for each memories ?
> 0x20000000 - ? The rest of memory
>
> Up until now I've used the flat memory model and not mapped the 2nd 256MB. This
> is rather wasteful for boards with 512MB of memory. SPARSEMEM look like what I
> need, but I've been unable to get it working. My attempts to configure it always
> end with sparse_index_alloc calling alloc_bootmem_node which fails to allocate
> 4KB. In prom_init I've added memory using add_memory_region.
>
> Are there any reasonably easy to follow implementations of sparsemem? I figure
> I'm missing something very basic, but perusal of Mips and the other
> architectures haven't helped much.
>
> My baseline is linux-mips 2.6.14.
>
> Any help would be appreciated,
>
> Chad
>
--
Franck
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-06-13 7:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-18 17:58 Any examples / docs for getting SPARSEMEM to work? Chad Reese
2006-05-18 20:23 ` Matt Porter
2006-06-13 7:01 ` Franck Bui-Huu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox