From owner-cvs-src@FreeBSD.ORG Wed Aug 4 20:18:45 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 8504416A4CE; Wed, 4 Aug 2004 20:18:45 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 65D8A43D4C; Wed, 4 Aug 2004 20:18:45 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i74KIjwh038472; Wed, 4 Aug 2004 20:18:45 GMT (envelope-from jhb@repoman.freebsd.org) Received: (from jhb@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i74KIjUa038471; Wed, 4 Aug 2004 20:18:45 GMT (envelope-from jhb) Message-Id: <200408042018.i74KIjUa038471@repoman.freebsd.org> From: John Baldwin Date: Wed, 4 Aug 2004 20:18:45 +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, 04 Aug 2004 20:18:45 -0000 jhb 2004-08-04 20:18:45 UTC FreeBSD src repository Modified files: sys/kern kern_mutex.c sys/sys mutex.h Log: Cache the value of curthread in the _get_sleep_lock() and _get_spin_lock() macros and pass the value to the associated _mtx_*() functions to avoid more curthread dereferences in the function implementations. This provided a very modest perf improvement in some benchmarks. Suggested by: rwatson Tested by: scottl Revision Changes Path 1.147 +5 -4 src/sys/kern/kern_mutex.c 1.73 +15 -9 src/sys/sys/mutex.h