From owner-cvs-src@FreeBSD.ORG Tue Apr 6 12:13:24 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 708D716A4CE; Tue, 6 Apr 2004 12:13:24 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5811343D1F; Tue, 6 Apr 2004 12:13:24 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i36JCPGe036233; Tue, 6 Apr 2004 12:12:25 -0700 (PDT) (envelope-from jhb@repoman.freebsd.org) Received: (from jhb@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i36JCP1m036228; Tue, 6 Apr 2004 12:12:25 -0700 (PDT) (envelope-from jhb) Message-Id: <200404061912.i36JCP1m036228@repoman.freebsd.org> From: John Baldwin Date: Tue, 6 Apr 2004 12:12:25 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: 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: Tue, 06 Apr 2004 19:13:24 -0000 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. 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