Skip to contentSkip to conversation

vmalloc/vfree

DISCUSSION Venu Vadapalli 2 participants 2 messages Sep 10, 2002

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
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 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

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