summaryrefslogtreecommitdiff
path: root/Kernel/VM/InodeVMObject.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-07-23 02:40:16 +0200
committerAndreas Kling <kling@serenityos.org>2021-07-23 03:24:44 +0200
commit082ed6f417db7f74ba7f09f4d5e82ae288105d46 (patch)
tree5822c79b887e22020fdee41e05de66ab3e0ba42f /Kernel/VM/InodeVMObject.h
parent64babcaa83e8885215e79cb6940402b0db80e516 (diff)
downloadserenity-082ed6f417db7f74ba7f09f4d5e82ae288105d46.zip
Kernel: Simplify VMObject locking & page fault handlers
This patch greatly simplifies VMObject locking by doing two things: 1. Giving VMObject an IntrusiveList of all its mapping Region objects. 2. Removing VMObject::m_paging_lock in favor of VMObject::m_lock Before (1), VMObject::for_each_region() was forced to acquire the global MM lock (since it worked by walking MemoryManager's list of all regions and checking for regions that pointed to itself.) With each VMObject having its own list of Regions, VMObject's own m_lock is all we need. Before (2), page fault handlers used a separate mutex for preventing overlapping work. This design required multiple temporary unlocks and was generally extremely hard to reason about. Instead, page fault handlers now use VMObject's own m_lock as well.
Diffstat (limited to 'Kernel/VM/InodeVMObject.h')
-rw-r--r--Kernel/VM/InodeVMObject.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/Kernel/VM/InodeVMObject.h b/Kernel/VM/InodeVMObject.h
index 63fee76f0e..85cde2ca1b 100644
--- a/Kernel/VM/InodeVMObject.h
+++ b/Kernel/VM/InodeVMObject.h
@@ -37,8 +37,6 @@ protected:
virtual bool is_inode() const final { return true; }
- int release_all_clean_pages_impl();
-
NonnullRefPtr<Inode> m_inode;
Bitmap m_dirty_pages;
};