Re: AGP slot vs. more than 2GB RAM



On Sunday 04 January 2009 01:44, someone identifying as
*phil-news-nospam@xxxxxxxx* wrote in /comp.os.linux.hardware:/

On Tue, 30 Dec 2008 11:54:57 +0100 Aragorn <aragorn@xxxxxxxxxxxxxxxxxxx>
wrote:

| 64-bit kernels on the other hand do not suffer from the PCI memory hole
| and will use up all the RAM in your machine for virtual memory. No
| non-clustered x86-64 computer can ever hold as much memory as a 64-bit
| kernel (with 40 address lines) can handle anyway. :-)

It looks like the kernel supports at least 48 bits for address in 64 bit
mode, at least virtual addresses. Maybe some day the hardware will, too.

Yes, there are 48 address bits for virtual memory, but only 40 for
physically installed RAM. This is - of course - specific to /x86-64./

I'm still trying to figure out how to build a working 64-bit kernel while
on a 32-bit system. Google found a lot of dead ends (just about everyone
says to use a 64-bit runtime).

You will need the latest /make/ tools for that, and a recent kernel -
preferably a vanilla flavored one. In older kernels the options for
building a 64-bit kernel were not available when you were running a 32-bit
operating system.

It *is* however possible to use a 32-bit userland with a 64-bit Linux
kernel, and those who worry about larger pointer sizes et al in a 64-bit
environment should consider going this way. On /x86-64,/ a 64-bit Linux
kernel can make use of the /NX/ bit present in the hardware, whereas 32-bit
kernels cannot. A 32-bit kernel with /HIGHMEM_64/ support - or in other
words, a PAE kernel - /can/ however /emulate/ an NX bit in software.

Both 32-bit PAE kernels and 64-bit kernels are exempt from the infamous PCI
memory hole, which exists on 32-bit non-PAE kernels only. The technical
explanation is that 32-bits of physical addressing space only allows for up
to 4 GB of physical memory only, but PCI equipment also requires a memory
address for a kernel to be able to access it, and a memory address can be
assigned only to one device at the same time.

Therefore, on 32-bit non-PAE systems, PCI devices are given a memory address
ranging from the 4 GB upper boundary downward, and any physical RAM with
such an address becomes inaccessible. This is not the case for 64-bit
kernels as PCI addresses can be assigned from the upper memory boundary
downward, and this boundary lies - as I stated earlier - way beyond the
physical memory capacity of any current /x86-64/ mainboards. For PAE
32-bit kernels, the upper boundary is 64 GB, and while there are
motherboards out there that support this quantity of RAM, they are still
quite rare at this stage.

The bottom line is that with the modern hardware available today, if you do
still want to stick to a 32-bit userland, you should at the very least run
a 32-bit PAE kernel, or make use of a natively 64-bit kernel with 32-bit
compatibility if your machine has more than 3.1 GB of physical RAM
installed, and given the added security of the /NX/ bit - whether emulated
by the kernel in PAE mode or implemented via hardware on 64-bit systems - I
would say that it pays off even if you have less than 3.1 GB of RAM in your
machine.

;-)
--
*Aragorn*
(registered GNU/Linux user #223157)
.



Relevant Pages

  • Re: 2.6.19-rc6-mm1 -- sched-improve-migration-accuracy.patch slows boot
    ... Allocating PCI resources starting at 20000000 ... per task-struct memory footprint: 1200 bytes ... Linux Plug and Play Support v0.97 Adam Belay ... Freeing unused kernel memory: 156k freed ...
    (Linux-Kernel)
  • [PATCH 2.6.24] mm: BadRAM support for broken memory
    ... This is the latest version of the BadRAM patch, ... run Linux on broken memory. ... a new kernel appeared, ... the BadRAM subsystem dealing with statically challanged RAM modules. ...
    (Linux-Kernel)
  • Re: Patch 4/6 randomize the stack pointer
    ... > it," so perhaps this would be a good compromise. ... less than 512M of memory to keep track of. ... what about the case where you have gobs of RAM and need a highmem ... Kernel data structures, no. ...
    (Linux-Kernel)
  • Re: 2.6.33: pci 0000:00:00.0: address space collision / spontaenous reboots
    ... Expanded resource reserved due to conflict with PCI Bus 0000:00 ... AMD PCI address space routing. ... but your kernel is only compiled to support two. ... The memory has been tested, latest memtest from the latest System Rescue ...
    (Linux-Kernel)
  • 2.6.33 dies on modprobe
    ... The kernel starts up fine and mounts the root-filesystem, ... Freeing unused kernel memory: 408k freed ... # CPUFreq processor drivers ...
    (Linux-Kernel)