Kernel: Remove the big inode lock

This moves locking to the inodes themselves which allows reducing lock
times significantly. Main inodes (ext2 and tmpfs) still do contain a
single big mutex that gets locked during operations but now we have the
architecture to optimize these.
This commit is contained in:
2026-05-09 23:28:00 +03:00
parent a7356716ff
commit 9f4271f6d8
31 changed files with 378 additions and 189 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ namespace Kernel
if (type == Type::PRIVATE)
TRY(region->m_dirty_pages.resize(BAN::Math::div_round_up<size_t>(size, PAGE_SIZE)));
LockGuard _(inode->m_mutex);
SpinLockGuard _(inode->m_shared_region_lock);
if (!(region->m_shared_data = inode->m_shared_region.lock()))
{
auto shared_data = TRY(BAN::RefPtr<SharedFileData>::create());