Subject: Re: Condition variables
To: Eduardo Horvath <>
From: Jason R Thorpe <>
List: tech-kern
Date: 06/06/2000 18:52:00
On Tue, Jun 06, 2000 at 08:58:19AM -0700, Eduardo Horvath wrote:

 > O.K.  So we're going for SolarisBSD? 8^)

Hey, Solaris does actually do a lot of things right :-)

 > I suppose this is more of an implementation question.  The `cond_*'
 > interface is conceptually cleaner from a naming perspective (although I
 > prefer to use `cv_*' since that's less typing) but more complicated from a
 > programming perspective since you now need to allocate, initialize,
 > and keep track of `condvar_t's.  Do we gain significant performance
 > advantages from making this change, considering it will probably require
 > modifications to large numbers of kernel datastructures?

So, Eduardo, Bill Sommerfeld, and I hashed this out privately today, and
the result of the discussion was to change tsleep() into ltsleep()
(interlocked tsleep) which also takes a simplelock interlock argument.

So, <sys/cond.h> and the cond_*() calls are dead.  This obviously
resulted in smaller changes to use it (and low UVM is fully converted
to the interlocked tsleep in my tree), avoids the data structure bloat,
and we can now concentrate on improving the sleep queue implementation

The old tsleep() will be kept as a macro during the transitional period
from big lock to smaller locks.

        -- Jason R. Thorpe <>