cvs commit: src/sys/conf options src/sys/kern kern_mutex.c

John Baldwin jhb at FreeBSD.org
Tue Apr 6 12:33:42 PDT 2004


On Tuesday 06 April 2004 03:12 pm, John Baldwin wrote:
> jhb         2004/04/06 12:12:25 PDT
>
>   FreeBSD src repository
>
>   Modified files:
>     sys/conf             options
>     sys/kern             kern_mutex.c
>   Log:
>   Add a new kernel option MUTEX_WAKE_ALL that changes the mutex unlock code
>   to awaken all waiters when a contested mutex is released instead of just
>   the highest priority waiter.  If the various threads are awakened in
>   sequence then each thread may acquire and release the lock in question
>   without contention resulting in fewer expensive unlock and lock
>   operations.  This old behavior of waking just the highest priority is
>   still used if this option is specified.  Making the algorithm conditional
>   on a kernel option will allows us to benchmark both cases later and
>   determine which one should be used by default.

Solaris uses the MUTEX_WAKE_ALL algorithm according to Solaris Internals, btw, 
after they benchmarked things both ways.

-- 
John Baldwin <jhb at FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org


More information about the cvs-src mailing list