[linux-elitists] ME roadshow

Ben ben@valinux.com
Thu Sep 7 09:57:35 PDT 2000


> It used to be that all physical RAM pages were mapped all the time,
> but the addition of >2GB memory handling on IA32 has added support
> for dynamic mapping of physical memory into the kernel address space.
> That's a special case, though; usually it's all mapped all the time.
> 

Am I correct in thinking that the reason for mapping all the RAM into
user space is that it makes the process of copying memory when doing
something like a write much easier.

> It basically looks like this:
> 
>                                             Dynamic kernel
>                                               mappings
>                                               (vmalloc)
>                                 Kernel mapping   |
>                                  for all RAM     |
>       VM for one user program          |         |
>    ______________________________   ___|____    _|___
>   /                              \ /        \  /     \
>  |--------------------------------|---------------------|
>  0                                ^                    4GB
>                              PAGE_OFFSET
>                       (usually 0xC0000000 = 3GB)
> [not to scale]

In the >2 Gb RAM case is the picture essentially the same but the
"kernel mapping for all RAM" becomes "kernel mapping for some RAM" and
that "some RAM" ends up being what is currently needed by the kernel.

> 
> On a task switch, the VM beneath PAGE_OFFSET changes to that of another
> process, but the VM above PAGE_OFFSET stays the same.
> 
> miket
> 





More information about the linux-elitists mailing list