Hi Friends,

Please help me to figure out some basic concepts in MM.

>From the books, i learned that VMA to PA translation consists of traversing 
>the full page directory, which consists of   Global Directory, Middle 
>Directory and Page Table.

I have also read that, VMA to PA translation is done using a macro virt_to_page 
 defined as given below.

#define virt_to_page(kaddr) (mem_map + (__pa(kaddr) >> PAGE_SHIFT))


If there is a macro, why we need code for traversing all the page directories 
?.  This macro is a simple math, which points to an index in global mem_map 
array, which contains all the pages in the system.


So my doubts are, 
Is the macro only for ZONE_NORMAL (upto 896M, which is directly mapped by 
kernel)  memory pages ?.
Is mem_map array contains pages upto ZONE_NORMAL ?
Is page traversing happens only for HIGH_MEM ?.

Regards,
Shameem



      

Reply via email to