[ltp] Kernel only see 3 of 4GB
Frank Fiene
linux-thinkpad@linux-thinkpad.org
Tue, 5 Jun 2007 09:52:26 +0200
On Montag, 4. Juni 2007, Bernard Tremblay wrote:
> On Mon, 4 Jun 2007 15:36:52 +0200, "Florian Reitmeir"
>
> <florian@reitmeir.org> said:
> > On Mon, 04 Jun 2007, r8scq7b02@sneakemail.com wrote:
> > > On Monday 04 June 2007 04:56, Michael Gaber wrote:
> > > > yup, you'll have to use a 64 bit system because a 32bit can
> > > > only address 4GB
> > >
> > > Are you sure about that?
> > >
> > > linux-image-2.6-686-bigmem:
> > > This package depends on the latest binary image for Linux kernel
> > > 2.6 on Pentium Pro/Celeron/Pentium II/Pentium III/Pentium 4 with
> > > 4-64G RAM machines.
> >
> > not all chipsets support more than 3gb, even on amd64
> > architectures. and on 32 bit there is a limit of 3gb _per_ process.
> >
> > --
> > Florian Reitmeir
> > --
> > The linux-thinkpad mailing list home page is at:
> > http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad
>
> Hi,
>
> Both are true. 2**32 = 4GB thus you cannot address more than
> that. But there is ways to make the 32 bits machine to use more than
> 32 bits in a virtual address... It's call AWE (Advanced Windowing
> Extensions). The idea is to add a 3rd level to the calculation from
> virtual to real address. You add 4 more bits to the addressing and
> you then have 2**4=16 windows of 4GB each that you can address wich
> give your exactly 64GB. This is a similar process that we used
> before in 16 bits addressing to go over the 64KB limitation. This
> AWE feature is available at high price from M$ if you can afford to
> buy a datacenter licence. This feature, as one would expect, is free
> with Linux big memory kernel. Linux hackers please correct me if I'm
> making wrong assumptions about that AWE feature.
>
> We have some Compaq servers here at my work place with 4GB that
> report to have 3,6GB... I don't know if it's because of PCI mapping
> but it makes some sense to me. But why would this PCI mapping not
> calculated as being part of the physical memory ?
>
> Anybody would have a clearer explanation about how all this works
> and what is the BIOS role in this ?
Yes, but this takes too long! :-) AFAIK the CPU can only address 4GB of
RAM for one process, minus 1GB (or 512MB with special settings) for the
kernel memory space.
The rest is done during context switching, so after every context switch
(multithreading oder multitasking) the CPU uses another block of memory
(max. 4GB), this might be slow, not? Is there a kernel expert to
agree? :-)
But AWE is only a windows API to use this PAE (Physical Address
Extension with 36 bits). ;-)
Frank