From 1c5ffaae41be4e67f81b46c3bfdce7f54a1dc8e0 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 2 Feb 2022 00:51:45 +0100 Subject: 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. --- Kernel/Memory/Region.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Kernel/Memory/Region.h') diff --git a/Kernel/Memory/Region.h b/Kernel/Memory/Region.h index e977eecc8b..810a466ba9 100644 --- a/Kernel/Memory/Region.h +++ b/Kernel/Memory/Region.h @@ -196,8 +196,7 @@ public: private: Region(VirtualRange const&, NonnullRefPtr, size_t offset_in_vmobject, OwnPtr, 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) { -- cgit v1.2.3