Paging: Difference between revisions

768 bytes added ,  6 years ago
m
improved invlpg section
[unchecked revision][unchecked revision]
m (Added mention of Intel's "57-bit virtual addressing" extension)
m (improved invlpg section)
Line 193:
}
</source>
 
This only invalidates the page on the current processor. If you're using SMP, you'll need to send an IPI to the other processors so that they can also invalidate the page (this is called a TLB shootdown; it's very slow), making sure to avoid any nasty race conditions. You may only want to do this when removing a mapping, and just make your page fault handler invalidate a page if it you didn't invalidate a mapping addition on that processor by looking through the page directory, again avoiding race conditions.
 
When you modify an entry in the page directory, rather than just a page table, you'll need to invalidate each page in the table. Alternatively, you could reload CR3 which will invalidates the whole directory, but this may be slower. (TODO time this)
 
== Paging Tricks ==
Anonymous user