vmalloc/vfree
Looking at vmalloc implementation, it fills the page table mappings (pgd and pmd) of only init_mm. When other tasks access these pages their mappings are updated on demand by the page fault handler, right? Vfree, also, updates the entries of just init_mm and, of course, flushes the cache and the tlb. But what about other tasks that have acquired mappings to these pages?
-Venu
Quoted 3 lines · Venu Vadapalli
Looking at vmalloc implementation, it fills the page table mappings (pgd and pmd) of only
init_mm. When other tasks access these pages their mappings are updated on demand by the page fault handler, right? Vfree, also, updates the entries of justinit_mmand, of course, flushes the cache and the tlb. But what about other tasks that have acquired mappings to these pages?-Venu
The pagetables for the kernel space are shared between all processes, except for the top level which is why the page fault handler exists. The actual pages that make up the shared pagetables never change once allocated which is the reason we can be lazy about updating the top level table of each task.
--
Brian Gerst