From owner-cvs-src@FreeBSD.ORG Tue Apr 6 20:43:18 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 45FD616A4CE; Tue, 6 Apr 2004 20:43:18 -0700 (PDT) Received: from mail.chesapeake.net (chesapeake.net [208.142.252.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id C93CF43D5A; Tue, 6 Apr 2004 20:43:17 -0700 (PDT) (envelope-from jroberson@chesapeake.net) Received: from mail.chesapeake.net (localhost [127.0.0.1]) by mail.chesapeake.net (8.12.10/8.12.10) with ESMTP id i373fHVf076717; Tue, 6 Apr 2004 23:41:17 -0400 (EDT) (envelope-from jroberson@chesapeake.net) Received: from localhost (jroberson@localhost)i373fGAP076706; Tue, 6 Apr 2004 23:41:17 -0400 (EDT) (envelope-from jroberson@chesapeake.net) X-Authentication-Warning: mail.chesapeake.net: jroberson owned process doing -bs Date: Tue, 6 Apr 2004 23:41:15 -0400 (EDT) From: Jeff Roberson To: John Baldwin In-Reply-To: <200404061912.i36JCP1m036228@repoman.freebsd.org> Message-ID: <20040406234035.U72393@mail.chesapeake.net> References: <200404061912.i36JCP1m036228@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2004 03:43:18 -0000 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? > > Requested by: tanimura-san > > Revision Changes Path > 1.439 +1 -0 src/sys/conf/options > 1.138 +10 -0 src/sys/kern/kern_mutex.c >