From owner-cvs-src@FreeBSD.ORG Wed Jan 5 21:13:28 2005 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 F2B3F16A4CE; Wed, 5 Jan 2005 21:13:27 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E126F43D2D; Wed, 5 Jan 2005 21:13:27 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j05LDRQG040493; Wed, 5 Jan 2005 21:13:27 GMT (envelope-from jhb@repoman.freebsd.org) Received: (from jhb@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j05LDRhG040492; Wed, 5 Jan 2005 21:13:27 GMT (envelope-from jhb) Message-Id: <200501052113.j05LDRhG040492@repoman.freebsd.org> From: John Baldwin Date: Wed, 5 Jan 2005 21:13:27 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/kern kern_mutex.c src/sys/sys mutex.h 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, 05 Jan 2005 21:13:28 -0000 jhb 2005-01-05 21:13:27 UTC FreeBSD src repository Modified files: sys/kern kern_mutex.c sys/sys mutex.h Log: Rework the optimization for spinlocks on UP to be slightly less drastic and turn it back on. Specifically, the actual changes are now less intrusive in that the _get_spin_lock() and _rel_spin_lock() macros now have their contents changed for UP vs SMP kernels which centralizes the changes. Also, UP kernels do not use _mtx_lock_spin() and no longer include it. The UP versions of the spin lock functions do not use any atomic operations, but simple compares and stores which allow mtx_owned() to still work for spin locks while removing the overhead of atomic operations. Tested on: i386, alpha Revision Changes Path 1.152 +2 -8 src/sys/kern/kern_mutex.c 1.74 +26 -5 src/sys/sys/mutex.h