开发者

4GB/4GB Kernel VM Split

Friends,

I saw th开发者_运维技巧is article by Ingo Molnar, a famous Linux Kernel enthusiast where he talks about 4GB/4GB split.

In this article he says that

with the 4G/4G patch, the kernel can be compiled in 4G/4G mode, in which case there's a full, separate 4GB VM for the kernel, and there are separate full (and per-process) 4GB VMs for user-space.

My problem starts here:

  1. My assumption was that in a monolithic kernel like as in Linux, the kernel and user part of process shares same PROCESS ADDRESS SPACE. So with a Linux kernel that does not have this 4G/4G patch, we have 3/1 split for user virtual space and kernel virtual space respectively.

    In fact kernel's 1GB virtual space is mapped in every process' virtual address space. Put it simple, PROCESS ADDRESS SPACE is 4GB, out which 1GB is allotted to kernel. Is it true?

  2. Going by the article in the question - and if my assumption as said in 1) is right - does he mean that the kernel address space is no more mapped into PROCESS ADDRESS SPACE and we have a different virtual address space for kernel and there is no sharing of address space?

    That is PROCESS ADDRESS SPACE is 4GB and KERNEL ADDRESS SPACE is another 4GB; rather than the fact that PROCESS ADDRESS SPACE has enlarged to become 8GB out of which 4GB is shared for kernel.

I know I am sounding bit stupid here :).


If I understand the article correctly, the kernel and the userspace don't share the same address space after the patch. This however costs switching page tables during each userspace/system switch.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜