Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Oct 2009 02:43:32 +1000 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Robert Noland <rnoland@FreeBSD.org>
Cc:        arch@FreeBSD.org, Andriy Gapon <avg@icyb.net.ua>, John Baldwin <jhb@FreeBSD.org>
Subject:   Re: Interrupt Descriptions
Message-ID:  <20091002004627.L21519@delplex.bde.org>
In-Reply-To: <1254402755.2320.60.camel@balrog.2hip.net>
References:  <200909301732.20589.jhb@freebsd.org> <4AC4A567.7050204@icyb.net.ua> <1254402755.2320.60.camel@balrog.2hip.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 1 Oct 2009, Robert Noland wrote:

> On Thu, 2009-10-01 at 15:49 +0300, Andriy Gapon wrote:
>> on 01/10/2009 00:32 John Baldwin said the following:
>>> ...
>>> An example from this patch is:
>>>
>>>> vmstat -i
>>> interrupt                          total       rate
>>> irq1: atkbd0                           8          0
>>> irq4: uart0                          751          5
>>> irq6: fdc0                             6          0
>>> irq14: ata0                           36          0
>>> irq20: uhci0                          20          0
>>> irq23: uhci3 ehci0                     2          0
>>> irq28: mpt0                         1661         11
>>> irq256: igb0:tx 0                    880          6
>>> irq257: igb0:rx 0                   1098          7
>>> irq258: igb0:link                      3          0
>>> irq259: igb1:tx 0                      1          0
>>> irq260: igb1:rx 0                    134          0
>>> irq261: igb1:link                      3          0
>>
>> Example above doesn't demonstrate what happens when there are shared interrupts.

irq23 seems to be shared by uhci3 and ehci0.  This part of the description
is not new (I think device names are just concatenated until space runs out).

>> Would it still look nice (with sufficiently long descriptions)?
>
> vmstat -i already chops off lots of stuff if there are very many shared
> irqs.

Not vmstat -i, but the kernel.  vmstat -i attempts to display the
entire string, unlike systat -v, but the kernel only has space for
strings of length MAXCOMLEN - 1 (18) (ie_name[MAXCOMLEN] nd
ie_fullname[MAXCOMLEN] in <sys/interrupt.h>) (unless jhb increased
this).  This is the same limit as for command names of executables,
except for the off-by-1 error for interrupt names, and for various
bugs involving thread names (p_comm[MAXCOMLEN + 1], etc.).

Concatenating thread names with process names causes similar display
problems in ps and top, etc.  Space is short for displaying just
p_comm[] plus args, and showing td_name[] too needs more space.  Actually
concatenation doesn't work at all.  ps must select the "name" string
that works, but it gets this wrong somehow (ps -laxHw seems to display
only p_comm (ki_comm in ps), resulting in useless names for all idle
and interrupt threads, although ps has code to support td_name (ki_ocomm
is abused to hold the part of this that fits in ps).  -H works almost
right in top, and the truncated td_name string can be seen using the
undocumented tdnam keyword in ps).

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091002004627.L21519>