diff options
author | Andreas Kling <kling@serenityos.org> | 2021-07-23 02:40:16 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-23 03:24:44 +0200 |
commit | 082ed6f417db7f74ba7f09f4d5e82ae288105d46 (patch) | |
tree | 5822c79b887e22020fdee41e05de66ab3e0ba42f /Kernel/Devices/PCSpeaker.h | |
parent | 64babcaa83e8885215e79cb6940402b0db80e516 (diff) | |
download | serenity-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/PCSpeaker.h')
0 files changed, 0 insertions, 0 deletions