Question

I have been reading [1] to have an idea about the HIGHMEM. The article says that "If the kernel wishes to be able to access the system's physical memory directly, however, it must set up page tables which map that memory into the kernel's part of the address space" .That is exactly where I have confusion. What do they mean by accessing physical memory directly? Does that mean explicitly stating the physical address?(AFAIK, that is not possible in Linux kernel) Then they go on stating that "it must set up page tables which map that memory into the kernel's part of the address space". That is something you do in the HIGHMEM solution,isn't it? Please help me understand the problem which lead to the HIGHMEM solution.

[1] http://lwn.net/Articles/75174/

Was it helpful?

Solution

1 If the kernel wishes to be able to access the system's physical memory directly, however, it must set up page tables which map that memory into the kernel's part of the address space
I think the author want to emphasize kernel need page table to address physical memory.

2 t must set up page tables which map that memory into the kernel's part of the address space Kernel part of the address space also need page tables to map that memory, while High memory, instead, has no direct kernel mapping. You can find the sentences on that article "When the kernel needs to work with a page in high memory, it must explicitly set up a special page table to map it into the kernel's address space first."

OTHER TIPS

FIRST THIS IS ONLY RELEVANT TO x86-32 architecture

If you read the article carefully you'll get the concepts. Below is a SIMPLIFIED (and somewhat crude) way to look at it:

1) The kernel starts out with a COMPLETELY mapped out addressable memory for 32-bit platform (irrespective the ACTUAL memory available) and says 1GB for me 3GB for user space.

2) Because sharing the memory space like this gives significant performance benefits (lookups etc. are super easy and fast) we create a world where kernel starts at 0xc0000000

3) Hardware vendors kept on adding weird paging modes where you could potentially address more than 4GB of memory ... However in order to keep things manageable you'd have to setup the concept of HiMEM and even there you'd be limited to a maximum of 8GB to 16GB because Kernel developers didn't want to add a lot of weird code to handle larger sizes on 32-bit

So once again the issue is that 32-bit word can only address 4GB of memory directly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top