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... > 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). > 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... Cheers, Muli -- Muli Ben-Yehuda http://www.mulix.org | http://mulix.livejournal.com/
signature.asc
Description: Digital signature