From: Shachar Shemesh (linux-il_at_nonexisting.hamakor.org.il)
Date: Wed 16 Jun 2004 - 06:48:48 IDT
Muli Ben-Yehuda wrote:
>On Tue, Jun 15, 2004 at 11:19:42PM +0300, Shachar Shemesh wrote:
>
>
>>If choosing "off" gives each process a 3GB usable address space, why
>>should I want to turn it on if my machine only has 2GB?
>>
>>
>
>Because Linux only direclty maps the first 896mb of physical
>memory. If your machine has 2GB of phys. memory, and you choose
>"off", your kernel will only recognize the first 896mb of memory. The
>documentatino text leaves something to be desired...
>
>
I'll say. I still didn't understand it, though.
>
>
>>If I understand correctly, running in 4GB mode means that I need to
>>remap the kernel space every time I enter kernel context, which imposes
>>some performance penalty.
>>
>>
>
>That's 4:4, which is something different. It is used when you need 4gb
>of address space for either the kernel or userspace (or both).
>
>
Is it one of the options in himem support? I have there "off", "4GB",
and "64GB".
>>One should think I would like to avoid it if
>>it's not necessary.This means that only going above 3GB would cause me
>>to want to turn this on, and even then, only if I have a single app that
>>needs more than 3GB of memory.
>>
>>Am I wrong here? Is this a bug in the documentation?
>>
>>
>
>You're mixing virtual memory (the available address space) and Linux's
>physical memory handling. To recap, only the first 896mb is directly
>mapped by the kernel, and for the rest (anything up to 4GB of physical
>memory) you need "highmem support". Then the kernel will use the
>physical memory between 896mb-4gb by mapping it "on the fly" whenever
>it needs to be used. This does incur some run time overhead, but only
>for the memory between 896mb-4gb (ZONE_HIGHMEM), which will not be
>used at all otherwise...
>
>
You lost me totally.
Let's see what I understand. I get 3GB of virtual memory, no matter what
I compile in. If I want 4, I need a "4:4" patch, which is presumably not
there by default.
If I compiled himem support to "off", I get just 1GB (well, less) of
physical memory easily accessed. What's the difference? If I have a
machine with 4GB of physical memory, and himem support compiled "off",
and I ask for 2.5GB of heap memory, what is going to happen? Do I get
failure? Do I swap? Is the memory going to be used, but with some
performance penalty per context-switch?
>Cheers,
>Muli
>
>
Even more confused than before,
Shachar
-- Shachar Shemesh Lingnu Open Source Consulting ltd. http://www.lingnu.com/ ================================================================= To unsubscribe, send mail to linux-il-request_at_linux.org.il with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail linux-il-request_at_linux.org.il
This archive was generated by hypermail 2.1.7 : Wed 16 Jun 2004 - 07:01:02 IDT