forked from Bananymous/banan-os
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:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user