1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 02:18:12 +00:00

Kernel: Only update page tables for faulting region

When a page fault led to the mapping of a new physical page, we were
updating the page tables for *every* region that shared the same
underlying VMObject.

Let's just not do that, avoiding a bunch of unnecessary page table
updates and TLB invalidations.
This commit is contained in:
Andreas Kling 2022-02-02 00:51:45 +01:00
parent 4389c7de25
commit 1c5ffaae41
2 changed files with 11 additions and 29 deletions

View file

@ -196,8 +196,7 @@ public:
private:
Region(VirtualRange const&, NonnullRefPtr<VMObject>, size_t offset_in_vmobject, OwnPtr<KString>, Region::Access access, Cacheable, bool shared);
[[nodiscard]] bool remap_vmobject_page(size_t page_index, bool with_flush = true);
[[nodiscard]] bool do_remap_vmobject_page(size_t page_index, bool with_flush = true);
[[nodiscard]] bool remap_individual_page(size_t page_index, ShouldFlushTLB = ShouldFlushTLB::Yes);
void set_access_bit(Access access, bool b)
{