From owner-cvs-all@FreeBSD.ORG Thu May 15 20:10:07 2008 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B3871065673; Thu, 15 May 2008 20:10:07 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 387728FC14; Thu, 15 May 2008 20:10:07 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m4FKA7oi001328; Thu, 15 May 2008 20:10:07 GMT (envelope-from attilio@repoman.freebsd.org) Received: (from attilio@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m4FKA7p9001327; Thu, 15 May 2008 20:10:07 GMT (envelope-from attilio) Message-Id: <200805152010.m4FKA7p9001327@repoman.freebsd.org> From: Attilio Rao Date: Thu, 15 May 2008 20:10:07 +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_sx.c subr_lock.c subr_witness.c src/sys/sys _lock.h _lockmgr.h _mutex.h _rwlock.h _sx.h lock.h lockmgr.h mutex.h rwlock.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2008 20:10:07 -0000 attilio 2008-05-15 20:10:07 UTC FreeBSD src repository Modified files: sys/kern kern_sx.c subr_lock.c subr_witness.c sys/sys _lock.h _lockmgr.h _mutex.h _rwlock.h _sx.h lock.h lockmgr.h mutex.h rwlock.h Log: - Embed the recursion counter for any locking primitive directly in the lock_object, using an unified field called lo_data. - Replace lo_type usage with the w_name usage and at init time pass the lock "type" directly to witness_init() from the parent lock init function. Handle delayed initialization before than witness_initialize() is called through the witness_pendhelp structure. - Axe out LO_ENROLLPEND as it is not really needed. The case where the mutex init delayed wants to be destroyed can't happen because witness_destroy() checks for witness_cold and panic in case. - In enroll(), if we cannot allocate a new object from the freelist, notify that to userspace through a printf(). - Modify the depart function in order to return nothing as in the current CVS version it always returns true and adjust callers accordingly. - Fix the witness_addgraph() argument name prototype. - Remove unuseful code from itismychild(). This commit leads to a shrinked struct lock_object and so smaller locks, in particular on amd64 where 2 uintptr_t (16 bytes per-primitive) are gained. Reviewed by: jhb Revision Changes Path 1.60 +1 -0 src/sys/kern/kern_sx.c 1.23 +1 -4 src/sys/kern/subr_lock.c 1.249 +41 -64 src/sys/kern/subr_witness.c 1.16 +2 -5 src/sys/sys/_lock.h 1.2 +0 -1 src/sys/sys/_lockmgr.h 1.14 +0 -1 src/sys/sys/_mutex.h 1.5 +0 -1 src/sys/sys/_rwlock.h 1.2 +0 -1 src/sys/sys/_sx.h 1.73 +4 -5 src/sys/sys/lock.h 1.70 +1 -0 src/sys/sys/lockmgr.h 1.103 +2 -0 src/sys/sys/mutex.h 1.19 +2 -0 src/sys/sys/rwlock.h