From owner-freebsd-current@FreeBSD.ORG Sun May 11 19:19:15 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 33B9F37B401 for ; Sun, 11 May 2003 19:19:15 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id C62FB43FCB for ; Sun, 11 May 2003 19:19:13 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3p2/8.8.7) with ESMTP id MAA17301; Mon, 12 May 2003 12:18:44 +1000 Date: Mon, 12 May 2003 12:18:42 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Bakul Shah In-Reply-To: <200305112258.h4BMwWPF029180@bitblocks.com> Message-ID: <20030512121311.G77707@gamplex.bde.org> References: <200305112258.h4BMwWPF029180@bitblocks.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: phk@phk.freebsd.dk cc: current@freebsd.org cc: "M. Warner Losh" Subject: Re: Interrupt latency problems X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2003 02:19:15 -0000 On Sun, 11 May 2003, Bakul Shah wrote: > Is it possible to cheaply check how long a mutex was held? No, since reading the time can't be done cheaply. > If it crosses some sysctl var set threshold you can increment > some count and/or drop into the debugger. That is one way to > find all mutex slowpokes. You can even find a distribution > by incrementing an array element. Array indexed by heldtime > rounded down to multiples of 10ms or so. Just an idea -- > ignore it if it doesn't make sense! The MUTEX_PROFILING option implements most of this. Bruce