From owner-cvs-all Mon Aug 26 11:48:20 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3AFC337B400; Mon, 26 Aug 2002 11:48:15 -0700 (PDT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 89DD743E6A; Mon, 26 Aug 2002 11:48:13 -0700 (PDT) (envelope-from iedowse@maths.tcd.ie) Received: from gosset.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 26 Aug 2002 19:48:12 +0100 (BST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/sys ktr.h src/sys/kern kern_mutex.c In-Reply-To: Your message of "Mon, 26 Aug 2002 11:39:38 PDT." <200208261839.g7QIdckr094663@freefall.freebsd.org> Date: Mon, 26 Aug 2002 19:48:12 +0100 From: Ian Dowse Message-ID: <200208261948.aa37056@salmon.maths.tcd.ie> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <200208261839.g7QIdckr094663@freefall.freebsd.org>, Ian Dowse writes : > Add a new KTR type KTR_CONTENTION, and use it in the mutex code to > log the start and end of periods during which mtx_lock() is waiting > to acquire a sleep mutex. The log message includes the file and > line of both the waiter and the holder. A simple perl script for parsing the output of ktrdump into some mutex contention statistics is at: http://people.freebsd.org/~iedowse/mtx_contention/ Without increasing the KTR buffer size or taking a lot of samples, these statistics are going to be fairly crude, but they may help to give some information about where the biggest bottlenecks lie. Ian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message