From owner-cvs-all@FreeBSD.ORG Wed Apr 7 12:55:50 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 B92B216A4CE for ; Wed, 7 Apr 2004 12:55:50 -0700 (PDT) Received: from mail5.speakeasy.net (mail5.speakeasy.net [216.254.0.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 963EF43D2F for ; Wed, 7 Apr 2004 12:55:50 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 8012 invoked from network); 7 Apr 2004 19:47:42 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 7 Apr 2004 19:47:42 -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 i37JjkNH013535; Wed, 7 Apr 2004 15:47:20 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: Jeff Roberson Date: Wed, 7 Apr 2004 13:32:20 -0400 User-Agent: KMail/1.6 References: <200404061912.i36JCP1m036228@repoman.freebsd.org> <20040406234035.U72393@mail.chesapeake.net> In-Reply-To: <20040406234035.U72393@mail.chesapeake.net> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200404071332.20846.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: cvs-src@FreeBSD.org cc: src-committers@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: Wed, 07 Apr 2004 19:55:50 -0000 On Tuesday 06 April 2004 11:41 pm, Jeff Roberson wrote: > On Tue, 6 Apr 2004, 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. > > This seems like an optimization on UP and a pessimization on SMP. Perhaps > you should make it conditional on mp_ncpus? Sun found it to be an optimization in general, and they tend to have a lot of very MP SMP boxes. :) It is a kernel option specifically so we can benchmark it for various test cases. I wouldn't mind having different defaults based on #ifdef SMP, but I'd rather avoid any run-time checks. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org