From owner-freebsd-current@FreeBSD.ORG Sun Jul 18 20:31:14 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 280AE1065670 for ; Sun, 18 Jul 2010 20:31:14 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from email1.allantgroup.com (email1.emsphone.com [199.67.51.115]) by mx1.freebsd.org (Postfix) with ESMTP id C07E58FC0A for ; Sun, 18 Jul 2010 20:31:13 +0000 (UTC) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by email1.allantgroup.com (8.14.0/8.14.0) with ESMTP id o6IKVCuZ073755 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 18 Jul 2010 15:31:13 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.4/8.14.4) with ESMTP id o6IKVCUA034249 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 18 Jul 2010 15:31:12 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.4/8.14.3/Submit) id o6IKNcni010225; Sun, 18 Jul 2010 15:23:38 -0500 (CDT) (envelope-from dan) Date: Sun, 18 Jul 2010 15:23:38 -0500 From: Dan Nelson To: Doug Barton Message-ID: <20100718202338.GI5485@dan.emsphone.com> References: <20100717192128.GM2381@deviant.kiev.zoral.com.ua> <20100718103003.GO2381@deviant.kiev.zoral.com.ua> <4C43541C.3060101@FreeBSD.org> <20100718194109.GU2381@deviant.kiev.zoral.com.ua> <4C435CBE.50500@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C435CBE.50500@FreeBSD.org> X-OS: FreeBSD 8.1-PRERELEASE User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: clamav-milter 0.96 at email1.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (email1.allantgroup.com [199.67.51.78]); Sun, 18 Jul 2010 15:31:13 -0500 (CDT) X-Scanned-By: MIMEDefang 2.45 Cc: Kostik Belousov , freebsd-current@freebsd.org, Rui Paulo Subject: Re: Why is intr taking up so much cpu? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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, 18 Jul 2010 20:31:14 -0000 In the last episode (Jul 18), Doug Barton said: > On 07/18/10 12:41, Kostik Belousov wrote: > > When intr time starts accumulating again, try to do > > "procstat -kk " and correlate the clock thread tid > > with the backtrace. Might be, it helps to guess what callouts are eating > > the CPU. > > Will do, thanks! You can also use dtrace to get a count of callouts and their time spent. Run this for a few seconds then hit ^C: #! /usr/sbin/dtrace -s /* #pragma D option quiet */ callout_execute:::callout_start { this->start = timestamp; } callout_execute:::callout_end { this->end = timestamp; /* printf("%a %d\n",args[0]->c_func, this->end - this->start); */ @times[args[0]->c_func] = quantize(this->end - this->start); /* @times[args[0]->c_func] = lquantize(this->end - this->start,0,300000,10000); */ @counts[args[0]->c_func] = count(); } END { printa("%a %@u\n",@times); printa("%a %@u\n",@counts); } -- Dan Nelson dnelson@allantgroup.com