mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 08:27:35 +00:00
Kernel: Instrument syscalls with their process big lock requirements
Currently all syscalls run under the Process:m_big_lock, which is an obvious bottleneck. Long term we would like to remove the big lock and replace it with the required fine grained locking. To facilitate this goal we need a way of gradually decomposing the big lock into the all of the required fine grained locks. This commit introduces instrumentation to the syscall table, allowing the big lock requirement to be toggled on/off per syscall. Eventually when we are finished, no syscall will required the big lock, and we'll be able to remove all of this instrumentation.
This commit is contained in:
parent
308396bca1
commit
af543328ea
3 changed files with 179 additions and 163 deletions
|
@ -882,6 +882,12 @@ inline ProcessID Thread::pid() const
|
|||
} while (0)
|
||||
}
|
||||
|
||||
#define VERIFY_PROCESS_BIG_LOCK_ACQUIRED(process) \
|
||||
VERIFY(process->big_lock().own_lock());
|
||||
|
||||
#define VERIFY_NO_PROCESS_BIG_LOCK(process) \
|
||||
VERIFY(!process->big_lock().own_lock());
|
||||
|
||||
inline static String copy_string_from_user(const Kernel::Syscall::StringArgument& string)
|
||||
{
|
||||
return copy_string_from_user(string.characters, string.length);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue