Subject: Re: Pulling simple syscalls out from the giant lock
To: None <tech-kern@netbsd.org>
From: Ignatios Souvatzis <is@netbsd.org>
List: tech-kern
Date: 06/07/2005 21:12:41
On Tue, Jun 07, 2005 at 01:48:20PM -0400, Nathan J. Williams wrote:
> Thor Lancelot Simon <tls@rek.tjls.com> writes:
>
> > The vnode locks needed for getcwd() certainly _ought_ to be MP-safe,
> > no? What's the point of having them there if they aren't?
>
> They ought to be, I suppose, but I'm not going to issue a warranty on
> them. Does anyone claim to understand our filesystem locking in any detail?
>
> > The other one that comes immediately to mind, though, is gettimeofday().
> > Oh, and getppid() and getrlimit(), maybe.
>
> gettimeofday() looks like it ought to be okay, since it has its own
> little lock. getppid() needs to be protected against the parent dying
> and reparenting it to init.
Why? Maybe I'm missing something, but what keeps the parent from dying
after the syscall returns in the child, but before the child uses the
information? If nothing, as I think, what changes when the parent dies
using a different cpu? Oh wait, getppid & friends have to pull the ppid
value out of the parent's nose... I wonder whether it would be better to
cache the ppid value in the children and update it when the parent dies.
Regards,
Ignatios
--
seal your e-mail: http://www.gnupg.org/