How does Arm Processor Knows the page is present in the memory : pte_present

Submitted by Vijayendra suman
on June 4, 2009 - 7:56am

Hello All,

I want to know a information regarding ARM processor, I have enabled swap partition for while compiling the kernel.

I want to know how does the H/W knows the page is not present in the RAM so that it raises an exception which makes it to copy from the swap if the page is swapped out.

I know there is a bit pgd_t pte_present, But I am not sure

1) who updates this bit
2) how does the memory manager be able to know the page is present in the swap or memory

I will be thankfull if some one who has worked on ARM processor with swap enabled throws light on this.

Thanks & Regards
Vijayendra Suman

why?

on
June 12, 2009 - 7:07pm

why do you have to know this? many people use computers with swapping and don't care about the hardware implementation, do you want to port or optimize or debug the code?

you get detailed data sheets and architecture manuals from the chip manufacturers' websites. most of these documents are fairly readable, and you are just interested in the MMU chapter.

from what i can spot a page fault raises an exception which is handled in do_page_fault in arch/arm/mm/fault.c, which after doing architecture-specific things ends up in the architecture-independent handle_mm_fault in mm/memory.c, which finds the pte and calls handle_pte_fault, where pte_mkXXX-functions are called.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.