Re: Why is intr taking up so much cpu?

From: Dan Nelson <dnelson_at_allantgroup.com>
Date: Sun, 18 Jul 2010 15:23:38 -0500
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 <intr process pid>" 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); */
        _at_times[args[0]->c_func] = quantize(this->end - this->start);
/*      _at_times[args[0]->c_func] = lquantize(this->end - this->start,0,300000,10000); */
        _at_counts[args[0]->c_func] = count();
}

END
{
        printa("%a %_at_u\n",_at_times);
        printa("%a %_at_u\n",_at_counts);
}


-- 
	Dan Nelson
	dnelson_at_allantgroup.com
Received on Sun Jul 18 2010 - 18:31:14 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:05 UTC