Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Nov 2000 12:30:45 -0800
From:      Jake Burkholder <jburkhol@home.com>
To:        John Baldwin <jhb@FreeBSD.ORG>
Cc:        smp@FreeBSD.ORG
Subject:   Re: patch: allproc_lock 
Message-ID:  <20001120203045.3DAB8BA7A@io.yi.org>
In-Reply-To: Message from John Baldwin <jhb@FreeBSD.ORG>  of "Mon, 20 Nov 2000 12:14:29 PST." <XFMail.001120121429.jhb@FreeBSD.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> On 20-Nov-00 Jake Burkholder wrote:
> >> 
> >> Attached is a patch that adds allproc_lock.  This is a lockmgr
> >> lock which protectes the following:
> >> 
> >> allproc
> >> zombproc
> >> pidhashtbl
> >> proc.p_list
> >> proc.p_hash
> >> nextpid
> >> 
> >> Please review it.
> > 
> > Sorry, too quick with the send...<blush>
> 
> Well, I kind of don't like having allproc_lock/unlock functions.
> I would prefer explicit lockmgr() calls with on an allproc_lock
> variable.  Also, we might consider having a very early

Sure, how come?  I did it this way because lockmgr takes so many
parameters which I expect will always be the same; the lock should
always be gotten on behalf of curproc, etc.

> SI_SUB_LOCKS_INIT that initializes lots of locks such as allproc_lock
> and the callout wheel mutex.  Also, did you see my lock list document?
> Looks like I need to update it so it can handle lockmgr locks. :-P

Yeah, I figured you were eating turkey this weekend  :)

I'll write up an entry for the callout_lock if you want.  It
locks the callwheel, ticks, softticks and nextsoftcheck.

You might also want to account for stuff that's not locked, but
is safe by virtue of atomicity.  I think astpending falls into this
category since its per-cpu.

> 
> > Here's the patch:
> 
> -- 
> 
> John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
> PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
> "Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-smp" in the body of the message




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-smp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001120203045.3DAB8BA7A>