Fwd: Memory split in 64-bit environment
Adam Lee
adam8157 at gmail.com
Fri Nov 2 10:32:36 EDT 2012
On Fri, Nov 02, 2012 at 07:40:11PM +0530, Pritam Bankar wrote:
> On Fri, Nov 2, 2012 at 4:26 PM, Mulyadi Santosa
> <mulyadi.santosa at gmail.com> wrote:
> > Hi :)
> >
> > On Fri, Nov 2, 2012 at 5:46 PM, Pritam Bankar
> > <pritambankar1988 at gmail.com> wrote:
> >> But I have some questions,
> >>
> >> 1. How is memory split up on 64-bit architecture
> >
> > in this URL:
> > http://unix.stackexchange.com/questions/32244/user-kernel-split-in-64bit-linux
> >
> > it says user space get 128 TiB...the rest you can read there :)
> >
> >> 2. Can we override this 3:1 split ?
> >
> > sure.... just change PAGE_OFFSET if I remember correctly...however,
> > the effects might be harmful, for example for certain virtualization
> > since they assume certain address for memory allocation
> >
> >> 3. If yes, who can do that user or kernel?
> >
> > kernel..for sure..
>
> Thanks Mulyadi. I gone through link but there is no explanation. What
> can be the logic behind kernel space of only 512 MB for 64-bit
> machines. We have 1GB kernel space in 32-bit architecture so 64-bit
> should ideally have much more than that.
1, that 512MB is kernel text mapping(kernel image), not kernel space.
2, kernel space under x86_64 is 128TB _now_, same as user space.
3, _now_, the split is 1:1, because address space is large enough.
4, change PAGE_OFFSET is not enough, _now_, under x86_64, PAGE_OFFSET is
0xffff880000000000, the beginning of direct mapping of all phys memory,
but the beginning of kernel space is 0xffff800000000000, there is a
guard hole between them.
Please check https://en.wikipedia.org/wiki/X86-64, and the reasons I
underline _now_ are kernel's current design and
https://en.wikipedia.org/wiki/X86-64#Canonical_form_addresses
PS, if you can read Chinese(hopeless), check my blog:
http://adam8157.info/blog/2012/07/linux-x86-64-vm/
--
Regards,
Adam Lee
http://adam8157.info
More information about the Kernelnewbies
mailing list