From owner-freebsd-arch@FreeBSD.ORG Thu Oct 1 16:43:36 2009 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFE67106568B; Thu, 1 Oct 2009 16:43:36 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail08.syd.optusnet.com.au (mail08.syd.optusnet.com.au [211.29.132.189]) by mx1.freebsd.org (Postfix) with ESMTP id 6B1358FC14; Thu, 1 Oct 2009 16:43:36 +0000 (UTC) Received: from c122-107-125-150.carlnfd1.nsw.optusnet.com.au (c122-107-125-150.carlnfd1.nsw.optusnet.com.au [122.107.125.150]) by mail08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n91GhWU3031833 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 2 Oct 2009 02:43:33 +1000 Date: Fri, 2 Oct 2009 02:43:32 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Robert Noland In-Reply-To: <1254402755.2320.60.camel@balrog.2hip.net> Message-ID: <20091002004627.L21519@delplex.bde.org> References: <200909301732.20589.jhb@freebsd.org> <4AC4A567.7050204@icyb.net.ua> <1254402755.2320.60.camel@balrog.2hip.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: arch@FreeBSD.org, Andriy Gapon , John Baldwin Subject: Re: Interrupt Descriptions X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Oct 2009 16:43:36 -0000 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 ) (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