From owner-cvs-src@FreeBSD.ORG Fri Jan 6 18:07:32 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org 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 91E2616A41F; Fri, 6 Jan 2006 18:07:32 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 58FA843D46; Fri, 6 Jan 2006 18:07:32 +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 k06I7WdF034801; Fri, 6 Jan 2006 18:07:32 GMT (envelope-from jhb@repoman.freebsd.org) Received: (from jhb@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k06I7WHQ034800; Fri, 6 Jan 2006 18:07:32 GMT (envelope-from jhb) Message-Id: <200601061807.k06I7WHQ034800@repoman.freebsd.org> From: John Baldwin Date: Fri, 6 Jan 2006 18:07:32 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/kern kern_mutex.c kern_sx.c subr_witness.c src/sys/sys _lock.h lock.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 06 Jan 2006 18:07:32 -0000 jhb 2006-01-06 18:07:32 UTC FreeBSD src repository Modified files: sys/kern kern_mutex.c kern_sx.c subr_witness.c sys/sys _lock.h lock.h Log: Trim another pointer from struct lock_object (and thus from struct mtx and struct sx). Instead of storing a direct pointer to a our lock_class struct in lock_object, reserve 4 bits in the lo_flags field to serve as an index into a global lock_classes array that contains pointers to the lock classes. Only debugging code such as WITNESS or INVARIANTS checks and KTR logging need to access the lock_class member, so this shouldn't add any overhead to production kernels. It might add some slight overhead to kernels using those debug options however. As with the previous set of changes to lock_object, this is going to completely obliterate the kernel ABI, so be sure to recompile all your modules. Revision Changes Path 1.160 +28 -15 src/sys/kern/kern_mutex.c 1.27 +2 -2 src/sys/kern/kern_sx.c 1.210 +33 -25 src/sys/kern/subr_witness.c 1.12 +0 -1 src/sys/sys/_lock.h 1.55 +19 -3 src/sys/sys/lock.h