Interrupt Descriptions

Bruce Evans brde at optusnet.com.au
Thu Oct 1 16:43:36 UTC 2009


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


More information about the freebsd-arch mailing list