On 03-04-08 23:04, Robert P. J. Day wrote:
* if i absolutely *know* that i'm building a kernel for a system
that doesn't have more than 1G of RAM, do i need HIGHMEM at all?
s/1G/896M/ and no.
hang on ... if i *know* i'm building a (32-bit) kernel for a system
with exactly 1G of RAM, are you saying i'll need HIGHMEM support?
If you're building with the standard 3/1 split, yes.
why? if you read the "Help" in the kernel configuration, it describes
the option CONFIG_HIGHMEM4G with:
"Select this if you have a 32-bit processor and between 1 and 4
gigabytes of physical RAM."
it doesn't say between 896M and 4G. i would have thought that, if i
had no more than 1G of RAM, i could select no HIGHMEM support, at
which the entire 1G kernel address space would be logical. you're
saying that's not true?
Indeed. It's really all quite obvious. The 32-bit addressspace (for the web
archive people... fixed width font please):
|-----| 4G
| |
|-----| 4G - VMALLOC_RESERVE
| |
| |
| L |
| |
| |
|-----| PAGE_OFFSET
| |
| |
. .
. .
| |
|-----| 0
The bit from PAGE_OFFSET (3G) to 4G is kernel addressspace into which as a
much of physical memory is mapped as possible. Since we also need a bit of
kernel addressspace for vmalloc and friends (including highmem mappings in
fact) that "as much as possible" is the 4G - VMALLOC_RESERVE - PAGE_OFFSET
available in region L above. Using the standard values, this boils down to 896M.
(aside, when you have less then 896M, all of your memory is lowmem, and
vmalloc starts allocating not at 4G - VMALLOC_RESERVE, but directly at
PAGE_OFFSET + PHYS_MEM).
By the way, do note that that "logical" nomenclature distinction is rather
linux specific. In general Intel lingo a logical adress is the same thing as
a virtual address. I'd try to not get to used to it or you risk being looked
at funny by people who do know x86 but not Linux specifically.
PAGE_OFFSET is also config settable and you'll note a value (0xb0000000)
selectable through the configurators that allows full use of 1G without
needing highmem -- but in the standard 3/1 split you do: you simply can't
fit 1G of memory in (1G - VMALLOC_RESERVE) of addressspace for any value of
VMALLOC_RESERVE != 0 (and it can't be 0 since you really, really need some
of it as said).
Rene.
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ