From owner-freebsd-current@FreeBSD.ORG Sun May 11 15:58:43 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 50E7B37B401 for ; Sun, 11 May 2003 15:58:43 -0700 (PDT) Received: from bitblocks.com (bitblocks.com [209.204.185.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF89A43FDF for ; Sun, 11 May 2003 15:58:42 -0700 (PDT) (envelope-from bakul@bitblocks.com) Received: from bitblocks.com (localhost [127.0.0.1]) by bitblocks.com (8.12.9/8.12.9) with ESMTP id h4BMwWPF029180; Sun, 11 May 2003 15:58:32 -0700 (PDT) (envelope-from bakul@bitblocks.com) Message-Id: <200305112258.h4BMwWPF029180@bitblocks.com> To: "M. Warner Losh" In-reply-to: Your message of "Sun, 11 May 2003 13:45:04 MDT." <20030511.134504.85393710.imp@bsdimp.com> Date: Sun, 11 May 2003 15:58:32 -0700 From: Bakul Shah cc: phk@phk.freebsd.dk cc: current@freebsd.org 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: Sun, 11 May 2003 22:58:43 -0000 Is it possible to cheaply check how long a mutex was held? 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!