Subject: Re: Pulling simple syscalls out from the giant lock
To: None <tls@rek.tjls.com>
From: Nathan J. Williams <nathanw@wasabisystems.com>
List: tech-kern
Date: 06/07/2005 13:30:53
Thor Lancelot Simon <tls@rek.tjls.com> writes:

> To a cursory examination, it looks like it's possible that a number of
> syscalls that touch only process state (particularly read-only ones
> like getcwd, getpid, etc. but also some that change state, like
> chdir, chroot, and a few others) could easily take subsystem locks
> instead of the giant lock.
> 
> Is this correct?

Yes. The MD syscall code checks for the SYSCALL_MPSAFE flag and
doesn't take the big-lock if it's set. It's currently only set for
getpid(). Exactly what else it could be easily applied to is less
clear; getpid() is the only true no-brainer that requires taking no
locks on anything at all.

        - Nathan