From owner-cvs-src@FreeBSD.ORG Sat Dec 15 23:13:32 2007 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5877716A417; Sat, 15 Dec 2007 23:13:32 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5160513C45A; Sat, 15 Dec 2007 23:13:32 +0000 (UTC) (envelope-from jeff@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 lBFNDWIv060642; Sat, 15 Dec 2007 23:13:32 GMT (envelope-from jeff@repoman.freebsd.org) Received: (from jeff@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id lBFNDWWR060641; Sat, 15 Dec 2007 23:13:32 GMT (envelope-from jeff) Message-Id: <200712152313.lBFNDWWR060641@repoman.freebsd.org> From: Jeff Roberson Date: Sat, 15 Dec 2007 23:13: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/conf options src/sys/kern kern_mutex.c kern_rwlock.c kern_sx.c kern_thread.c sched_4bsd.c sched_ule.c subr_lock.c src/sys/sys _lock.h lock_profile.h proc.h sx.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: Sat, 15 Dec 2007 23:13:32 -0000 jeff 2007-12-15 23:13:32 UTC FreeBSD src repository Modified files: sys/conf options sys/kern kern_mutex.c kern_rwlock.c kern_sx.c kern_thread.c sched_4bsd.c sched_ule.c subr_lock.c sys/sys _lock.h lock_profile.h proc.h sx.h Log: - Re-implement lock profiling in such a way that it no longer breaks the ABI when enabled. There is no longer an embedded lock_profile_object in each lock. Instead a list of lock_profile_objects is kept per-thread for each lock it may own. The cnt_hold statistic is now always 0 to facilitate this. - Support shared locking by tracking individual lock instances and statistics in the per-thread per-instance lock_profile_object. - Make the lock profiling hash table a per-cpu singly linked list with a per-cpu static lock_prof allocator. This removes the need for an array of spinlocks and reduces cache contention between cores. - Use a seperate hash for spinlocks and other locks so that only a critical_enter() is required and not a spinlock_enter() to modify the per-cpu tables. - Count time spent spinning in the lock statistics. - Remove the LOCK_PROFILE_SHARED option as it is always supported now. - Specifically drop and release the scheduler locks in both schedulers since we track owners now. In collaboration with: Kip Macy Sponsored by: Nokia Revision Changes Path 1.613 +0 -1 src/sys/conf/options 1.203 +6 -20 src/sys/kern/kern_mutex.c 1.33 +7 -24 src/sys/kern/kern_rwlock.c 1.58 +9 -25 src/sys/kern/kern_sx.c 1.263 +2 -0 src/sys/kern/kern_thread.c 1.112 +6 -1 src/sys/kern/sched_4bsd.c 1.219 +6 -0 src/sys/kern/sched_ule.c 1.19 +433 -221 src/sys/kern/subr_lock.c 1.15 +0 -25 src/sys/sys/_lock.h 1.16 +27 -112 src/sys/sys/lock_profile.h 1.497 +2 -0 src/sys/sys/proc.h 1.38 +1 -3 src/sys/sys/sx.h