lkml.org 
[lkml]   [2006]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: The 3G (or nG) Kernel Memory Space Offset
Dong Feng wrote:
> Sorry for my typo. I actually means "0-1G physical memory space." My
> question is actually why there is a 3G offset from linear kernel to
> physical kernel. Why not simply have kernel memory linear space
> located on 0-1G linear address, and therefore the physical kernel and
> linear kernel just coincide?

If kernel virtual addresses were low, you would either need to do an
address-space switch (=TLB flush) on every user-kernel switch, or
require userspace to be at some high address. The former would be very
expensive, and the latter very strange (the standard x86 ABI requires
low addresses). The clean solution is to map the kernel to the high
part of the address space, but it is easier to load the kernel into low
physical memory at boot, thus leading to a physical-virtual offset. The
selection of 3G is a reasonable tradeoff of physical memory size vs user
virtual address space size, but of course it can be adjusted, or you can
use highmem.

J
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-08-29 18:45    [W:0.057 / U:1.892 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site