2002-09-10 01:08:15

by Venu Vadapalli

[permalink] [raw]
Subject: 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



2002-09-10 13:29:05

by Brian Gerst

[permalink] [raw]
Subject: Re: vmalloc/vfree

Venu Vadapalli wrote:
> 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