diff options
author | Andreas Kling <kling@serenityos.org> | 2022-02-02 00:51:45 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-02 02:16:49 +0100 |
commit | 1c5ffaae41be4e67f81b46c3bfdce7f54a1dc8e0 (patch) | |
tree | 2940d698092b857c6e4b7c3dc7ef732b3adf414d /Kernel/Memory/Region.h | |
parent | 4389c7de25d1b7ebaad48da4f34f3be74440d516 (diff) | |
download | serenity-1c5ffaae41be4e67f81b46c3bfdce7f54a1dc8e0.zip |
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.
Diffstat (limited to 'Kernel/Memory/Region.h')
-rw-r--r-- | Kernel/Memory/Region.h | 3 |
1 files changed, 1 insertions, 2 deletions
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<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) { |