summaryrefslogtreecommitdiff
path: root/Kernel/Devices/AsyncDeviceRequest.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/Devices/AsyncDeviceRequest.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/Devices/AsyncDeviceRequest.h')
0 files changed, 0 insertions, 0 deletions