> Hey, can you guys give me a run-down on BIGMEM/HIGHMEM?

Well, those features added to recent 2.3.x (and BIGMEM even to
recent 2.2.x, I think) kernels allow Linux to use a larger amount
of physical memory.

Linux used to map the whole physical memory 1:1 into the kernel
virtual address space, starting at 0xC0000000.  This design makes
a lot of things easy, e.g. you can access the (paged-in) memory of
all processes from kernel space etc.

Obviously, this gets difficult to do if you have more than 1 GB
of physical memory.  The first hack to improve the situation was
to shift the user/kernel virtual address space split from 3/1 to
2/2 GB; this way you could access at least nearly 2 GB of physical
memory.

The BIGMEM architecture then allowed to use up to 4 GB of physical
memory by introducing two classes of physical memory: one that is
still mapped 1:1 into kernel space (this can be used for everything)
and one that is *not* mapped into the kernel address space, but is
only mapped into the *user* address space of a single process.  This
type of memory can only be used for certain purposes (basically, just
for anonymous mappings, i.e. large mmap( MAP_ANON ... )  allocations
by user mode apps).   Work is continuing to make the other parts of
the kernel aware of this new type of memory, with the goal of allowing
also page/buffer cache to reside there etc.  (This means that the
kernel needs to create temporary mappings to acces those pages that
it needs at the moment etc.).

HIGHMEM finally removes also the 4 GB barrier by activating the PAE
(physical address extension) mode of (certain) Intel processors (I think
only Xeons have this, right?).  This means that the format of the
page tables changes completely, in fact there are now *three* layers
of indirection instead of two, just like on e.g. Alpha processors.
The final physical address determined by lookup in those new page tables
can be up to 64 bit, although current processors pass only 36 bits to
the external address lines.  This still means you can have up to 64 GB
of physical memory.

*Virtual* memory still remains limited to 4 GB, so you can't map all that
memory at the same time.  With the BIGMEM architecture already in place,
this is no be deal, however -- you don't need to map the memory all the time 
any longer, anyway.

All this obviously has some effect on FreeMWare.  We don't support the
PAE-style page tables, for example; neither on the host nor on the guest
side.  Even the BIGMEM stuff *might* lead to problems, as we might need
to take care that the physical memory we allocate for the guest is 
actually not in the 'bigmem' area where is isn't mapped (on the other
hand, maybe we don't even care whether it is mapped into the host
kernel address space?) ...

Bye,
Ulrich

-- 
  Ulrich Weigand,
  IMMD 1, Universitaet Erlangen-Nuernberg,
  Martensstr. 3, D-91058 Erlangen, Phone: +49 9131 85-7688

Reply via email to