From owner-freebsd-arch@FreeBSD.ORG Thu Oct 1 13:49:31 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 DFB561065676 for ; Thu, 1 Oct 2009 13:49:31 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from gizmo.2hip.net (gizmo.2hip.net [64.74.207.195]) by mx1.freebsd.org (Postfix) with ESMTP id 812538FC0A for ; Thu, 1 Oct 2009 13:49:31 +0000 (UTC) Received: from [192.168.1.4] (adsl-157-40-167.bna.bellsouth.net [70.157.40.167]) (authenticated bits=0) by gizmo.2hip.net (8.14.3/8.14.3) with ESMTP id n91DCekb092689 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 1 Oct 2009 09:12:41 -0400 (EDT) (envelope-from rnoland@FreeBSD.org) From: Robert Noland To: Andriy Gapon In-Reply-To: <4AC4A567.7050204@icyb.net.ua> References: <200909301732.20589.jhb@freebsd.org> <4AC4A567.7050204@icyb.net.ua> Content-Type: text/plain Organization: FreeBSD Date: Thu, 01 Oct 2009 08:12:35 -0500 Message-Id: <1254402755.2320.60.camel@balrog.2hip.net> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_PBL, RDNS_DYNAMIC,SPF_SOFTFAIL autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on gizmo.2hip.net Cc: arch@FreeBSD.org, 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 13:49:32 -0000 On Thu, 2009-10-01 at 15:49 +0300, Andriy Gapon wrote: > on 01/10/2009 00:32 John Baldwin said the following: > > A few folks have asked recently for the ability to add descriptive strings to > > registered interrupt handlers. This is especially true since the advent of > > MSI with multiple interrupts per device. I hacked up a prototype today that > > adds a new 'bus_describe_intr()' that takes the IRQ resource, the void * > > cookie returned by bus_setup_intr() and var args description and appends that > > to the interrupt name in the thread and vmstat -i info. The current patch > > only has the MI bits and the MD bits for amd64 as well as a sample change to > > the igb(4) driver. > > > > The patch is at http://www.FreeBSD.org/~jhb/patches/intr_describe.patch. > > > > 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. > Would it still look nice (with sufficiently long descriptions)? vmstat -i already chops off lots of stuff if there are very many shared irqs. robert. -- Robert Noland FreeBSD