From owner-cvs-all@FreeBSD.ORG Tue Apr 6 12:33:42 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0E26016A4D1 for ; Tue, 6 Apr 2004 12:33:42 -0700 (PDT) Received: from mail1.speakeasy.net (mail1.speakeasy.net [216.254.0.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id D78E643D4C for ; Tue, 6 Apr 2004 12:33:41 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 14262 invoked from network); 6 Apr 2004 19:32:14 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 6 Apr 2004 19:32:14 -0000 Received: from 10.50.40.205 (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.10/8.12.10) with ESMTP id i36JW4NC007754; Tue, 6 Apr 2004 15:32:06 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: src-committers@FreeBSD.org Date: Tue, 6 Apr 2004 15:21:29 -0400 User-Agent: KMail/1.6 References: <200404061912.i36JCP1m036228@repoman.freebsd.org> In-Reply-To: <200404061912.i36JCP1m036228@repoman.freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200404061521.29681.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: cvs-src@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/conf options src/sys/kern kern_mutex.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2004 19:33:42 -0000 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 <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org