lkml.org 
[lkml]   [1998]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: MM with fragmented memory
Date
> I can see two viable approaches:
>
> (1) play linker tricks and insert holes in the kernel such that it skips
> over the gaps in memory. Then map all the memory 1:1 and let
> start_mem and end_mem each have one of the 512kB fragments for
> linear allocation.

I think if you have just 512kB fragments, it
would be a lot of trouble with linker, I guess you'd need to touch generic
code in a couple of places, etc. BTW: Are those frags at fixed locations or
do their addresses depend on how somebody stuffed SIMMs into it?
Another question: how large VA space do you have and how large PA space the
machine has? If e.g. max PA range is 2GB, but VA is 4GB, then you could
happily use 1:(1+off) mapping (or even 1:1), and map the kernel with a
virtual mapping to some other VA (so that kernel's 2MB (or so) would have
two mappings). If that's possible, then you won. In fact, that's how things
look like on sparc64:
physical memory may be non-contiguous, may start anywhere and consists of
chunks at least 4M long. We have an automatic mapping VA=PA+PAGE_OFFSET.
The kernel is located in first physical chunk, which is mapped with a 4M
page to 4MB VA.
The kernel already has PG_Skip stuff which is designed for non-contiguous
physical memory (ie. your mem_map will point to some valid pages and some
invalid pages (as no physical pages is mapped to them).

> (2) use the MMU to create virtually continuous memory and let the kernel
> manage that in the usual way.

If the above is not possible, then this should work just fine, although a
tiny bit slower. That's what sparc32/sun4m does in most cases, so the little
voice can stay back in your head, such scheme is tested and works.

Cheers,
Jakub
___________________________________________________________________
Jakub Jelinek | jj@sunsite.mff.cuni.cz | http://sunsite.mff.cuni.cz
Administrator of SunSITE Czech Republic, MFF, Charles University
___________________________________________________________________
Ultralinux - first 64bit OS to take full power of the UltraSparc
Linux version 2.1.125 on a sparc64 machine (498.80 BogoMips).
___________________________________________________________________

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.058 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site