Does Linux memory manager use recursive page tables?

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
Post Reply
mrn
Posts: 4
Joined: Sat Jan 15, 2011 11:56 am

Does Linux memory manager use recursive page tables?

Post by mrn »

Hi,
AFAIK Windows uses self-map entries in page tables/directory so its kernel can easily manipulate the contents of page tables/directory of current process by simply using some special virtual addresses. My question is: does Linux use similar technique? If not - how does it address a page table in order to manipulate its content?
Thanks.
OSwhatever
Member
Member
Posts: 598
Joined: Mon Jul 05, 2010 4:15 pm

Re: Does Linux memory manager use recursive page tables?

Post by OSwhatever »

I would be surprised if Linux doesn't. With 64-bit address space recursive page tables are mandatory if you're not going to waste to much memory on page tables. ARM has moved over to recursive page tables with LPAE which probably also be used in their upcoming 64-bit CPUs.
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: Does Linux memory manager use recursive page tables?

Post by gerryg400 »

With 64-bit address space recursive page tables are mandatory if you're not going to waste to much memory on page tables.
Actually it's the opposite. There is so much virtual memory available in a 64 bit address space that recursive page-table schemes are unnecessary at the moment. There are still advantages, but there may also be disadvantages depending on your design.
If a trainstation is where trains stop, what is a workstation ?
mrn
Posts: 4
Joined: Sat Jan 15, 2011 11:56 am

Re: Does Linux memory manager use recursive page tables?

Post by mrn »

I would be surprised if Linux doesn't.
But does it really? Wouldn't it break the linear shift between physical addresses and kernel virtual addresses?
OSwhatever
Member
Member
Posts: 598
Joined: Mon Jul 05, 2010 4:15 pm

Re: Does Linux memory manager use recursive page tables?

Post by OSwhatever »

mrn wrote:
I would be surprised if Linux doesn't.
But does it really? Wouldn't it break the linear shift between physical addresses and kernel virtual addresses?
The linux kernel isn't completely 1:1 mapped. What I know about is certain code areas 1:1 mapped as well as slab cache area. vmalloc for example uses non-continuous physical memory.
Post Reply