From owner-freebsd-arch@FreeBSD.ORG Sun Sep 27 10:41:21 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 E444A1065698; Sun, 27 Sep 2009 10:41:21 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id C0E378FC15; Sun, 27 Sep 2009 10:41:21 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 763DB46B23; Sun, 27 Sep 2009 06:41:21 -0400 (EDT) Date: Sun, 27 Sep 2009 11:41:21 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: arch@FreeBSD.org Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: current@FreeBSD.org Subject: [libdispatch-dev] GCD libdispatch w/Blocks support working on Free (f 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: Sun, 27 Sep 2009 10:41:22 -0000 Dear all-- Those of you at the Cambridge devsummit are already aware of the port of Apple's Grand Central Dispatch (GCD), a.k.a. libdispatch, to FreeBSD by Stacey Son and I, in collaboration with Apple. I've now uploaded my GCD talk slides to the wiki: http://wiki.freebsd.org/200909DevSummit We now have a devel/libdispatch port, which works out-of-the-box on FreeBSD 9-CURRENT. libdispatch requires modest changes to kqueue, which we will merge to 8.x once the code freeze lifts. As of yesterday, I have libdispatch working with Apple's "Blocks" C languae extension as found in clang, the last major architecture component required to use GCD-based applications FreeBSD. Jordan Hubbard at Apple has kindly provided the necessary bits bundled up in a clang/llvm/compiler-rt package for FreeBSD until the clang port is updated. Some details in the attached e-mail. As I mentioned at the FreeBSD developer summit, this is a work-in-progress (in particular, we don't support pthread work queues, which allow the kernel schedule to get involved in expanding the size of the thread worker pool dynamically), but it should now be more than adequate to use in practice. Robert N M Watson Computer Laboratory University of Cambridge ---------- Forwarded message ---------- Date: Sat, 26 Sep 2009 20:37:51 +0100 (BST) From: Robert Watson To: libdispatch-dev@lists.macosforge.org Subject: [libdispatch-dev] GCD libdispatch w/Blocks support working on FreeBSD Dear all: This is a quick update for those interested in the general portability of libdispatch, and perhaps specifically FreeBSD. With a bit of help from Jordan Hubbard, I now have libdispatch working with Blocks on FreeBSD. Jordan has put up a FreeBSD clang-devel package that includes Blocks parts and the C runtime bits here: http://static.macosforge.org/libdispatch/downloads/clang-devel.tgz I've updated the libdispatch build parts to detect and use Blocks when compiled with clang, and fixed a few nits in libdispatch that I ran into along the way (and one apparent clang bug). With Jordan's package as a starting point, Blocks pretty much "just worked", so I'm optimistic that people will be able to reproduce this on other platforms able to run the non-Blocks libdispatch without much difficulty. If you update to at least r45 of libdispatch, you should now be able to do: CC=clang ./configure --with-blocks-runtime=/usr/local/lib and get a libdispatch with Blocks support. The reason for the configure argument is that the current clang-devel package doesn't automatically add libBlocksRuntime dependency for binaries compiled with -fblocks. Once Blocks support shakes out a bit more in clang/FreeBSD, this should go away. I am able to run basic Blocks-based test tools with GCD on FreeBSD without difficulty. The FreeBSD port should be updated to reflect this shortly. Robert N M Watson Computer Laboratory University of Cambridge _______________________________________________ libdispatch-dev mailing list libdispatch-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/libdispatch-dev From owner-freebsd-arch@FreeBSD.ORG Mon Sep 28 11:06:50 2009 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 580141065672 for ; Mon, 28 Sep 2009 11:06:50 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 2B6998FC18 for ; Mon, 28 Sep 2009 11:06:50 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n8SB6oin063925 for ; Mon, 28 Sep 2009 11:06:50 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n8SB6nqU063921 for freebsd-arch@FreeBSD.org; Mon, 28 Sep 2009 11:06:49 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 28 Sep 2009 11:06:49 GMT Message-Id: <200909281106.n8SB6nqU063921@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-arch@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-arch@FreeBSD.org 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: Mon, 28 Sep 2009 11:06:50 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/120749 arch [request] Suggest upping the default kern.ps_arg_cache 1 problem total. From owner-freebsd-arch@FreeBSD.ORG Tue Sep 29 17:26:25 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 D8F241065676; Tue, 29 Sep 2009 17:26:25 +0000 (UTC) (envelope-from jiashiun@gmail.com) Received: from mail-iw0-f181.google.com (mail-iw0-f181.google.com [209.85.223.181]) by mx1.freebsd.org (Postfix) with ESMTP id 755B18FC2E; Tue, 29 Sep 2009 17:26:25 +0000 (UTC) Received: by iwn11 with SMTP id 11so3164894iwn.3 for ; Tue, 29 Sep 2009 10:26:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=gAcubmfjVMUGMTz0wTugO9Q5fQvg1Qj769adsLmomW4=; b=auR2SqPtQSFyynL/8KUt2VziPlrjuD2zr8fXA40nH4mErv/SKhoWJhthG9kdZlW5rl RP53ew4fK6c9zUk9EB7MOWWWpZCJILPRFgIEpfzxRjI1imNtXnUT4b9RH1FIed8vNouY blRPLBVcmIR5jHUSwzjfbeOisxoMEuI8Dx/Kg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=qjaOGCUVegt8g+H/8GunS+seNjDnrlUk2kJarXK8Ho2rZH5Nutim/ZUkI4rrZMEkzD 77P2kB34XrNNW9hzeMWQFQEnKQH3goqs67xDTuGJE843XxKVZY6RFfKhUhyTmI+4l8+u eDEBAMa0cbQTm27UPcwE+Jlqp2Y94Jg+hpEWQ= MIME-Version: 1.0 Received: by 10.231.21.158 with SMTP id j30mr9230818ibb.4.1254243508116; Tue, 29 Sep 2009 09:58:28 -0700 (PDT) In-Reply-To: <87ocp443e2.fsf@kobe.laptop> References: <20090921112657.GW95398@hoeg.nl> <20090921112917.GA89971@freebsd.org> <20090921113556.GX95398@hoeg.nl> <87ocp443e2.fsf@kobe.laptop> From: Jia-Shiun Li Date: Wed, 30 Sep 2009 00:58:08 +0800 Message-ID: <1d6d20bc0909290958s481f1bbew580baaf3e0e67d7f@mail.gmail.com> To: Giorgos Keramidas Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Ed Schouten , Roman Divacky , FreeBSD Current , FreeBSD Arch Subject: Re: tmux(1) in base 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: Tue, 29 Sep 2009 17:26:26 -0000 On Tue, Sep 22, 2009 at 1:24 AM, Giorgos Keramidas w= rote: > ^A is rather comfortable with my Caps Lock key swapped with Ctrl. =C2=A0I= f > the escape character of tmux can be configured to be ^A in the personal > startup configuration of each user, the awkwardness of ^B is really a > very minor issue. > > IMO, a sample screen-like config in /usr/share/examples will go a long > way towards making tmux in the base system a comfortable and viable > screen alternative :) I attempted to write my own .tmux.conf imitating screen key bindings, and then I found it easier to cp /usr/local/share/examples/tmux/screen-keys.conf ~/.tmux.conf ;) Jia-Shiun. From owner-freebsd-arch@FreeBSD.ORG Wed Sep 30 21:32:22 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 7BD6F106566B for ; Wed, 30 Sep 2009 21:32:22 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 50F408FC16 for ; Wed, 30 Sep 2009 21:32:22 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id D3EC346B03 for ; Wed, 30 Sep 2009 17:32:21 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id DA7F58A01B for ; Wed, 30 Sep 2009 17:32:20 -0400 (EDT) From: John Baldwin To: arch@freebsd.org Date: Wed, 30 Sep 2009 17:32:20 -0400 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200909301732.20589.jhb@freebsd.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 30 Sep 2009 17:32:20 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Subject: 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: Wed, 30 Sep 2009 21:32:22 -0000 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 -- John Baldwin From owner-freebsd-arch@FreeBSD.ORG Wed Sep 30 23:39:10 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 50F86106566B for ; Wed, 30 Sep 2009 23:39:10 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-yx0-f184.google.com (mail-yx0-f184.google.com [209.85.210.184]) by mx1.freebsd.org (Postfix) with ESMTP id 0B31A8FC19 for ; Wed, 30 Sep 2009 23:39:09 +0000 (UTC) Received: by yxe14 with SMTP id 14so909265yxe.7 for ; Wed, 30 Sep 2009 16:39:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=nMSFrLJI5355aDbOWNfVw3dcNiRHgzziX67KIcSlLOw=; b=vdIvjF87CsH2qh2X+nUvpLtAbP/QtwI5WyE8JS4BFKw/YruxbZxkUKt+/tar+hiPaj Vtdw9VDi7B3FiAn5bLU/Lqc3+A1y1Hg/qhsiARxPASJtUju9m+RU6l0CgK0688V7z7f0 t4uBLUJfqJitAH7cyQSnGXfkEIiWbfwOZ0XeU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=GqXBVFt7zSmhbxl4hTdAKZc4M+RSwZTxtBb0W0wlQmtS4PNBP8iRn5BQFKMO1ZlSbE RwYut2HZYioOU6Typv/7rSHHu09CNppZ2mVWE2/vSS3PyxLlT3YSx95cAONyTYOd2fx6 F2OL6OAMd1FpXozxL81F5O/j1dHP1wkfY+n6c= MIME-Version: 1.0 Received: by 10.101.164.9 with SMTP id r9mr390475ano.125.1254352131473; Wed, 30 Sep 2009 16:08:51 -0700 (PDT) In-Reply-To: <200909301732.20589.jhb@freebsd.org> References: <200909301732.20589.jhb@freebsd.org> Date: Wed, 30 Sep 2009 16:08:51 -0700 Message-ID: <2a41acea0909301608o6d0a832fref104ebfbcb0d71f@mail.gmail.com> From: Jack Vogel To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: arch@freebsd.org 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: Wed, 30 Sep 2009 23:39:10 -0000 Good job John, will make my test department very happy :) Once this is in CURRENT I will make changes to the ixgbe driver to use it also. Jack On Wed, Sep 30, 2009 at 2:32 PM, John Baldwin wrote: > 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 > > -- > John Baldwin > _______________________________________________ > freebsd-arch@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" > From owner-freebsd-arch@FreeBSD.ORG Thu Oct 1 00:03:01 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 9955E106566B; Thu, 1 Oct 2009 00:03:01 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by mx1.freebsd.org (Postfix) with ESMTP id 3757E8FC18; Thu, 1 Oct 2009 00:03:00 +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 mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n9102v3q008510 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 1 Oct 2009 10:02:58 +1000 Date: Thu, 1 Oct 2009 10:02:57 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: John Baldwin In-Reply-To: <200909301732.20589.jhb@freebsd.org> Message-ID: <20091001090218.L21015@delplex.bde.org> References: <200909301732.20589.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: arch@freebsd.org 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 00:03:01 -0000 On Wed, 30 Sep 2009, John Baldwin wrote: > 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 Interrupt names should be no longer than 4 (5 works sometimes) characters so that they can be displayed by systat -v. >... >> vmstat -i > interrupt total rate > irq1: atkbd0 8 0 The 4-5 characters doesn't include "irqN". (systat -v already does extra work to avoid the bad naming scheme visible here. It moves the "irqN" to the end, and removes the ":", else truncating these names would give a larger mess and there would only be space for 3-4 characters of the device name after wasting 1 for the ":".) "atkbd0" is already far too long, so systat -v would display "atkbd0 irq" in the 10 columns available, except it omits "irq" in this case so as to print the interrupt number, and actually displays "atkbd0 1". > irq4: uart0 751 5 > irq6: fdc0 6 0 > irq14: ata0 36 0 > irq20: uhci0 20 0 These are short enough to be displayed by systat -v (after removal of the ":" in 2 cases and after removal of the ":" and the "irq" in 1 case). > irq23: uhci3 ehci0 2 0 systat -v has no chance of displaying multiple devices per interrupt. I think it finds no space to print even the irq number, and also loses the ehci number after truncating at "uhci3 ehci". > irq28: mpt0 1661 11 Short enough. > irq256: igb0:tx 0 880 6 I think this gets truncated to "igb0:tx 0 ". The device name doesn't follows the rules for naming devices (should contain no whitespace), so the final "0" looks like the interrupt number. Interrupt numbers > 99 cause further problems for systat. Now there is only space for 3 characters in the device name ("xx0 irq256" takes 10 columns). > 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 Similar messes. systat has no support for varying the terminal width, and adding such support would be difficult because the display is very complicated and hard-coded, so the truncation occurs even if you have a wide terminal. Adding support for the English parser needed to translate more cases would be even more difficult. The "irqN:" translation is MD (probably only helps for amd64 and i386). The above output shows related misformatting for vmstat. Interrupt name strings are supposed to be NUL-terminated and packed into a string space, mainly to match the historical interface to vmstat, which was designed mainly for space-efficiency. I think they are still in a string space, but at least on amd64 and i386 the implementation is extremely space-inefficient, with many unused entries and every entry padded with spaces to length MAXCOMLEN bytes (plus the NUL terminator). MAXCOMLEN is 19, and most of the 19 are used for the verbose names in the above. Then vmstat leaves about 15 more spaces before the totals column (it uses format "%-*s %20llu..."), giving the above ugly output. The "*" in the format is supposed to be dynamic, but this is defeated by the space-padding. Leaving space for 20-digit numbers is bogus: the 20 is a hard coding of the number of digits needed to display the largest 64-bit long long, but long longs might be longer than that, and the maximum is unreachable even with 64-bit long longs. OTOH, MAXCOMLEN is a bit short for a description. Bruce From owner-freebsd-arch@FreeBSD.ORG Thu Oct 1 06:35:20 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 57959106566B for ; Thu, 1 Oct 2009 06:35:20 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 16A4B8FC0C for ; Thu, 1 Oct 2009 06:35:19 +0000 (UTC) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id AF68669959; Thu, 1 Oct 2009 06:35:18 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.3/8.14.3) with ESMTP id n916ZM5i088389; Thu, 1 Oct 2009 06:35:23 GMT (envelope-from phk@critter.freebsd.dk) To: Bruce Evans From: "Poul-Henning Kamp" In-Reply-To: Your message of "Thu, 01 Oct 2009 10:02:57 +1000." <20091001090218.L21015@delplex.bde.org> Date: Thu, 01 Oct 2009 06:35:22 +0000 Message-ID: <88388.1254378922@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: arch@freebsd.org 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 06:35:20 -0000 In message <20091001090218.L21015@delplex.bde.org>, Bruce Evans writes: >Interrupt names should be no longer than 4 (5 works sometimes) characters so >that they can be displayed by systat -v. I disagree. Bytes are cheaper now than they were on a PDP11. We should use as many as is necessary to convey sensible information. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-arch@FreeBSD.ORG Thu Oct 1 09:15:38 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 37D4F1065676 for ; Thu, 1 Oct 2009 09:15:38 +0000 (UTC) (envelope-from brampton@gmail.com) Received: from mail-ew0-f209.google.com (mail-ew0-f209.google.com [209.85.219.209]) by mx1.freebsd.org (Postfix) with ESMTP id B94888FC08 for ; Thu, 1 Oct 2009 09:15:37 +0000 (UTC) Received: by ewy5 with SMTP id 5so1489496ewy.36 for ; Thu, 01 Oct 2009 02:15:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=NvN6buSMY7ZmXacJHFoT9T1p1SZ7d6RZ/4eBTZxxV58=; b=IfSA+6o2ZSxuXJ429bc8YwXTEvHKhKrsh3rwpNMsnzyiMG/oR0cbJFew9hkOE8ifGg uvZSFqG+pHLLF9IEeES4sTyZPOmyyVqJL10SRj5V19mFOVDZKoSTWTu7WbyETFz04BNL yUsgHOZh/YpcxyTxr4n24E5JsKMcFsDb53P4s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=NWNetrd8mBec3N6xGk5J8VDgCyfFRo86rzL3CTAZTDmEuYC2wFUVQosxsSrfRs6a9Z H0O2e1DWsmhVbkxs1XELTKLcaMGZHI8XR/AdlU4CGRygdM8lz6K+AhNL7VMZ10wnd2a5 eOBjx9tW56odctih3e/E6e0xrWbqXRKI5WXcg= MIME-Version: 1.0 Sender: brampton@gmail.com Received: by 10.216.26.213 with SMTP id c63mr200259wea.41.1254387274057; Thu, 01 Oct 2009 01:54:34 -0700 (PDT) In-Reply-To: <200909301732.20589.jhb@freebsd.org> References: <200909301732.20589.jhb@freebsd.org> Date: Thu, 1 Oct 2009 09:54:33 +0100 X-Google-Sender-Auth: 884ae60602bf9e21 Message-ID: From: Andrew Brampton To: John Baldwin Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: arch@freebsd.org 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 09:15:38 -0000 2009/9/30 John Baldwin : > A few folks have asked recently for the ability to add descriptive string= s to > registered interrupt handlers. =C2=A0This is especially true since the ad= vent of > MSI with multiple interrupts per device. =C2=A0I hacked up a prototype to= day 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. =C2=A0The 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. > Very cool feature, which I had been hoping for on FreeBSD. Well done. Andrew From owner-freebsd-arch@FreeBSD.ORG Thu Oct 1 10:19:39 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 79634106566B for ; Thu, 1 Oct 2009 10:19:39 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from mail-fx0-f222.google.com (mail-fx0-f222.google.com [209.85.220.222]) by mx1.freebsd.org (Postfix) with ESMTP id 02C4F8FC17 for ; Thu, 1 Oct 2009 10:19:38 +0000 (UTC) Received: by fxm22 with SMTP id 22so2678680fxm.36 for ; Thu, 01 Oct 2009 03:19:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=C1mlRTH/4eTSDq9rz//g3LpKywJocGE204UxsQ2u67g=; b=YHgnPUMNZMyK4LCg3jyzHsDPhaxgs27w0ibUk5cbL5QMumVMOalkn+fHDduqI2DSTr YzbCzxa9tqfR7JVTt6DjSdL3oyDHbBVH86JAi7bDD43dHGeyv0iNqJx2SpmqPmDI2SBv SmG5ypSn1TB+EIJ8RqhnbxcQE84DJxUcFzj0c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=oBLLx8BvPui4HbxS9rYefrcwOBbqaNWi4W2lFcNtsNS9kIvc2LNOogChM7rjfux8EE cX1/siuXBmntLQaQWQRPPOXJJmqrVe0hhCZs9zxxQ2BMqqg86KgpRQPJJ1ZLqQ9dSb0D YP3nw7i+R5LlMmy37CxjSOkAZCYsbiL49xgrI= Received: by 10.86.158.29 with SMTP id g29mr1010090fge.4.1254390893031; Thu, 01 Oct 2009 02:54:53 -0700 (PDT) Received: from mac-mini.lan (bl6-144-180.dsl.telepac.pt [82.155.144.180]) by mx.google.com with ESMTPS id d4sm1530495fga.12.2009.10.01.02.54.52 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 01 Oct 2009 02:54:52 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1076) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes From: Rui Paulo In-Reply-To: <20091001090218.L21015@delplex.bde.org> Date: Thu, 1 Oct 2009 10:54:50 +0100 Content-Transfer-Encoding: 7bit Message-Id: <95A6555E-09DE-45E4-BF80-D2C524CD33C3@gmail.com> References: <200909301732.20589.jhb@freebsd.org> <20091001090218.L21015@delplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.1076) Cc: arch@freebsd.org 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 10:19:39 -0000 On 1 Oct 2009, at 01:02, Bruce Evans wrote: > On Wed, 30 Sep 2009, John Baldwin wrote: > >> 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 > > Interrupt names should be no longer than 4 (5 works sometimes) > characters so > that they can be displayed by systat -v. We should just change systat, IMHO, but I know it's not easy. -- Rui Paulo From owner-freebsd-arch@FreeBSD.ORG Thu Oct 1 12:58:34 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 D799E1065676; Thu, 1 Oct 2009 12:58:34 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by mx1.freebsd.org (Postfix) with ESMTP id 5CF108FC17; Thu, 1 Oct 2009 12:58:34 +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 mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n91CwNjr031957 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 1 Oct 2009 22:58:26 +1000 Date: Thu, 1 Oct 2009 22:58:23 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Poul-Henning Kamp In-Reply-To: <88388.1254378922@critter.freebsd.dk> Message-ID: <20091001224601.A21418@delplex.bde.org> References: <88388.1254378922@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: arch@freebsd.org 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 12:58:34 -0000 On Thu, 1 Oct 2009, Poul-Henning Kamp wrote: > In message <20091001090218.L21015@delplex.bde.org>, Bruce Evans writes: > >> Interrupt names should be no longer than 4 (5 works sometimes) characters so >> that they can be displayed by systat -v. > > I disagree. Bytes are cheaper now than they were on a PDP11. We should > use as many as is necessary to convey sensible information. s/should/shall/ then. It is the API that interrupt names must be no longer than 4. You can disagree with this being the best API but not with what it is. Using many bytes here results in no information being conveyed in some cases, not sensible information, when the long description is truncated to 3-4 characters to fit in the available space. Bruce From owner-freebsd-arch@FreeBSD.ORG Thu Oct 1 13:07:58 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 0DD1C1065679 for ; Thu, 1 Oct 2009 13:07:58 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 549DA8FC25 for ; Thu, 1 Oct 2009 13:07:57 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA03652; Thu, 01 Oct 2009 15:49:43 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <4AC4A567.7050204@icyb.net.ua> Date: Thu, 01 Oct 2009 15:49:43 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.23 (X11/20090825) MIME-Version: 1.0 To: John Baldwin References: <200909301732.20589.jhb@freebsd.org> In-Reply-To: <200909301732.20589.jhb@freebsd.org> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: arch@FreeBSD.org 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:07:58 -0000 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)? -- Andriy Gapon From owner-freebsd-arch@FreeBSD.ORG Thu Oct 1 13:31:35 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 EFC9D1065676; Thu, 1 Oct 2009 13:31:35 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by mx1.freebsd.org (Postfix) with ESMTP id 7463A8FC12; Thu, 1 Oct 2009 13:31:34 +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 mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n91DVWBB018121 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 1 Oct 2009 23:31:33 +1000 Date: Thu, 1 Oct 2009 23:31:32 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Rui Paulo In-Reply-To: <95A6555E-09DE-45E4-BF80-D2C524CD33C3@gmail.com> Message-ID: <20091001225842.X21418@delplex.bde.org> References: <200909301732.20589.jhb@freebsd.org> <20091001090218.L21015@delplex.bde.org> <95A6555E-09DE-45E4-BF80-D2C524CD33C3@gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: arch@freebsd.org 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:31:36 -0000 On Thu, 1 Oct 2009, Rui Paulo wrote: > On 1 Oct 2009, at 01:02, Bruce Evans wrote: > >> On Wed, 30 Sep 2009, John Baldwin wrote: >> >>> 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 >> >> Interrupt names should be no longer than 4 (5 works sometimes) characters >> so >> that they can be displayed by systat -v. Make that: "Interrupt names must must contain only characters that take 1 space to print, and must be no longer than 10 characters, or unique and without garbage when blindly truncated to 10 characters, or in a special form that can easily be understood and compressed to <= 10 characters. The special forms are..." Similarly for device names (max length 4 or 5) and sleep message strings (max length 6). > We should just change systat, IMHO, but I know it's not easy. It's impossible to make changes that increase display resource requirements without breaking something. Either small displays stop working or scrolling is required. Bruce From owner-freebsd-arch@FreeBSD.ORG Thu Oct 1 13:48:00 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 AFD28106568F for ; Thu, 1 Oct 2009 13:48:00 +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 6EFF48FC21 for ; Thu, 1 Oct 2009 13:48:00 +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 n91DluwM092899 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 1 Oct 2009 09:47:57 -0400 (EDT) (envelope-from rnoland@FreeBSD.org) From: Robert Noland To: Bruce Evans In-Reply-To: <20091001225842.X21418@delplex.bde.org> References: <200909301732.20589.jhb@freebsd.org> <20091001090218.L21015@delplex.bde.org> <95A6555E-09DE-45E4-BF80-D2C524CD33C3@gmail.com> <20091001225842.X21418@delplex.bde.org> Content-Type: text/plain Organization: FreeBSD Date: Thu, 01 Oct 2009 08:47:51 -0500 Message-Id: <1254404871.2320.99.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: Rui Paulo , arch@freebsd.org 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:48:00 -0000 On Thu, 2009-10-01 at 23:31 +1000, Bruce Evans wrote: > On Thu, 1 Oct 2009, Rui Paulo wrote: > > > On 1 Oct 2009, at 01:02, Bruce Evans wrote: > > > >> On Wed, 30 Sep 2009, John Baldwin wrote: > >> > >>> 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 > >> > >> Interrupt names should be no longer than 4 (5 works sometimes) characters > >> so > >> that they can be displayed by systat -v. > > Make that: "Interrupt names must must contain only characters that > take 1 space to print, and must be no longer than 10 characters, or > unique and without garbage when blindly truncated to 10 characters, > or in a special form that can easily be understood and compressed to > <= 10 characters. The special forms are..." > > Similarly for device names (max length 4 or 5) and sleep message strings > (max length 6). > > > We should just change systat, IMHO, but I know it's not easy. > > It's impossible to make changes that increase display resource requirements > without breaking something. Either small displays stop working or scrolling > is required. While I have always liked the fact that systat -v was capable of displaying most anything that you would care about in one display, lack of display real-estate is not a sufficient reason to limit the descriptions. Perhaps it is time for systat to get a bit of an overhaul... robert. > Bruce > _______________________________________________ > freebsd-arch@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" -- Robert Noland FreeBSD 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 From owner-freebsd-arch@FreeBSD.ORG Thu Oct 1 14:02:17 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 2A7801065696 for ; Thu, 1 Oct 2009 14:02:17 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id F0A7A8FC0A for ; Thu, 1 Oct 2009 14:02:16 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id A0FA446B09; Thu, 1 Oct 2009 10:02:16 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id CE5688A024; Thu, 1 Oct 2009 10:02:15 -0400 (EDT) From: John Baldwin To: Bruce Evans Date: Thu, 1 Oct 2009 09:49:20 -0400 User-Agent: KMail/1.9.7 References: <200909301732.20589.jhb@freebsd.org> <20091001090218.L21015@delplex.bde.org> In-Reply-To: <20091001090218.L21015@delplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910010949.20849.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 01 Oct 2009 10:02:15 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: arch@freebsd.org 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 14:02:17 -0000 On Wednesday 30 September 2009 8:02:57 pm Bruce Evans wrote: > On Wed, 30 Sep 2009, John Baldwin wrote: > > > 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 > > Interrupt names should be no longer than 4 (5 works sometimes) characters so > that they can be displayed by systat -v. For the machines this is targeted at (i.e. ones with devices using MSI/MSI-X) the number of interrupts is already well beyond what systat -v can currently display anyway. I believe most folks use vmstat -i or ithread stats in top to measure real-time interrupts at this point. Possibly systat could grow a new interrupt-only mode that has sufficient room for full interrupt names. FYI, it actually looks decent enough running a 7.x systat on a test 9.0 kernel: 25000 frevn pdpgs 2000 cpu0: time intrn igb0:tx 0 Disks da0 pass0 473896 wire 25 igb0:rx 0 KB/t 0.00 0.00 13872 act igb0:link tps 0 0 10080 inact igb1:tx 0 MB/s 0.00 0.00 128 cache 1 igb1:rx 0 %busy 0 0 7603460 free igb1:link For these devices with MSI, the description (tx 0, tx 1, link, etc.) is actually more meaningful than the IRQ. -- John Baldwin From owner-freebsd-arch@FreeBSD.ORG Thu Oct 1 14:02:18 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 EDD051065676 for ; Thu, 1 Oct 2009 14:02:17 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id AB58F8FC0C for ; Thu, 1 Oct 2009 14:02:17 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 5B6A946B03; Thu, 1 Oct 2009 10:02:17 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 9CC5B8A01F; Thu, 1 Oct 2009 10:02:16 -0400 (EDT) From: John Baldwin To: Andriy Gapon Date: Thu, 1 Oct 2009 09:53:33 -0400 User-Agent: KMail/1.9.7 References: <200909301732.20589.jhb@freebsd.org> <4AC4A567.7050204@icyb.net.ua> In-Reply-To: <4AC4A567.7050204@icyb.net.ua> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910010953.33838.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 01 Oct 2009 10:02:16 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: arch@freebsd.org 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 14:02:18 -0000 On Thursday 01 October 2009 8:49:43 am 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)? Currently MSI interrupts generally aren't shared. If they are shared what happens is that the 'name:descr' bit is treated as the full name of the device and the normal "+" or "*" truncation stuff kicks in so you would maybe have: irq280: igb0:tx 0 igb0:tx 1 except that doesn't fit in MAXCOMLEN so you would have: irq280: igb0:tx 0+ For the ithread name we are stuck with MAXCOMLEN. I would like to overhaul the intrcnt stuff to possibly allow for longer names and be mostly MI (having all the longs shared across cache lines that might be shared by multiple CPUs isn't ideal either at this point). I am considering having either an array or list of intrcnt structures with a name and a count with a sysctl that exports an array for vmstat to use (the kvm bits could always rebuild the list using the same logic as the sysctl handler for crash dumps). The current design is very limiting and forces the weird space padding to make renaming intrcnt descriptions manageable when adding/removing interrupt handlers. -- John Baldwin 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 From owner-freebsd-arch@FreeBSD.ORG Thu Oct 1 17:14:04 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 5BF1C1065695; Thu, 1 Oct 2009 17:14:04 +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 ECDD28FC15; Thu, 1 Oct 2009 17:14:03 +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 n91HE1HH005702 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 2 Oct 2009 03:14:02 +1000 Date: Fri, 2 Oct 2009 03:14:01 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: John Baldwin In-Reply-To: <200910010949.20849.jhb@freebsd.org> Message-ID: <20091002024550.X21519@delplex.bde.org> References: <200909301732.20589.jhb@freebsd.org> <20091001090218.L21015@delplex.bde.org> <200910010949.20849.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: arch@FreeBSD.org 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 17:14:04 -0000 On Thu, 1 Oct 2009, John Baldwin wrote: > On Wednesday 30 September 2009 8:02:57 pm Bruce Evans wrote: >> On Wed, 30 Sep 2009, John Baldwin wrote: >> >>> 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 >> >> Interrupt names should be no longer than 4 (5 works sometimes) characters so >> that they can be displayed by systat -v. > > For the machines this is targeted at (i.e. ones with devices using MSI/MSI-X) > the number of interrupts is already well beyond what systat -v can currently > display anyway. This should be fixed before expanding the names into descriptions. I wonder what uses all these interrupts. Most FreeBSD cluster machines use a whole 3 interrupts apart from acpi_timer, with 1 barely active (1 disk, 1 net, and 1 serial i/o probably only used for a serial console). My workstations use about 10 plus timers, but most are usually inactive except for net, keyboard and sometimes disk. Does anyone have systems more than about 16 disk controllers and 16 network cards so as to need more than 32 interrupts? > I believe most folks use vmstat -i or ithread stats in top > to measure real-time interrupts at this point. Possibly systat could grow a > new interrupt-only mode that has sufficient room for full interrupt names. I don't find static info and thus vmstat -i very useful. vmstat with a repeat interval is useful, but for some reason vmstat -i never supported the repeat interval (its multi-line display is certainly unsuitable for repetitions being readable), and with systat -v repetition in vmstat -i is rarely missed. A repeating vmstat -i would have even more space problems than systat -v, since it would want to repeat single line output. systat and most things just want a unique tag, not a description or even a full name. The full name could be looked up from a tag by looking at vmstat -i output which could show both. > > FYI, it actually looks decent enough running a 7.x systat on a test 9.0 kernel: > > 25000 frevn pdpgs 2000 cpu0: time > intrn igb0:tx 0 > Disks da0 pass0 473896 wire 25 igb0:rx 0 > KB/t 0.00 0.00 13872 act igb0:link > tps 0 0 10080 inact igb1:tx 0 > MB/s 0.00 0.00 128 cache 1 igb1:rx 0 > %busy 0 0 7603460 free igb1:link > > For these devices with MSI, the description (tx 0, tx 1, link, etc.) is > actually more meaningful than the IRQ. The irq is probably least useful for most devices. The above is only reasonable because I changed systat to move "irqN: " to " irqN" at the end. "irq256: bce0" on FreeBSD cluster machines is displayed reasonably as "bce0 256". But systat shouldn't have to do this. At least the form of the names used by systat (== the one given by the old intrnames API) should have names that are carefully phrased to have the most useful info first, and to not waste space with ": " or even "irq". Bruce From owner-freebsd-arch@FreeBSD.ORG Thu Oct 1 17:25:27 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 8D21B1065672; Thu, 1 Oct 2009 17:25:27 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-yw0-f197.google.com (mail-yw0-f197.google.com [209.85.211.197]) by mx1.freebsd.org (Postfix) with ESMTP id 284938FC17; Thu, 1 Oct 2009 17:25:27 +0000 (UTC) Received: by ywh35 with SMTP id 35so541049ywh.7 for ; Thu, 01 Oct 2009 10:25:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=Ba4i6uMCi4MvwuwnxgVVuS6sSyd9EREMvZCgYhQhC4U=; b=gUJstEthqf/26IJ+i+ZkMtBNPQOIE2Zd6lsRR7zVjcFGeeZoIN72MM2UiaCOxjVeCc wrEXTU6HszuTbaoiQ6yupOjZWzwm4WQgXza3/VF9V9uwCjw5Qwt0hIA8BZ6GFq8GddJW 4sDYR+pbKzGjDPdunOCVm93iS8gse9C9A0+fU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=l53VgklCPyddsInh/Ya2F7suRJyjp4XpL1Yj5jEd06tnAFrpFzNHy1lVi3h+tLw0Kp m61zzSCIwWcNIXLo/zjaSvIwHefXaIdmyE3wWqt4pX8JJX9MCnL7z0TleFVxcKkuCXAQ Gu9IdJ2gTmXrliNRhKxAr6Zhot66m+PsK/JgI= MIME-Version: 1.0 Received: by 10.101.62.6 with SMTP id p6mr1333969ank.153.1254417926173; Thu, 01 Oct 2009 10:25:26 -0700 (PDT) In-Reply-To: <20091002024550.X21519@delplex.bde.org> References: <200909301732.20589.jhb@freebsd.org> <20091001090218.L21015@delplex.bde.org> <200910010949.20849.jhb@freebsd.org> <20091002024550.X21519@delplex.bde.org> Date: Thu, 1 Oct 2009 10:25:26 -0700 Message-ID: <2a41acea0910011025q2b5834f2n113f5a8a607ecb4d@mail.gmail.com> From: Jack Vogel To: Bruce Evans Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: arch@freebsd.org 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 17:25:27 -0000 What uses them, machines with multiqueue, in my ixgbe driver a rx/tx pair of queues is configured and bound to each cpu. This ability really matters when you do virtualization because the queues can be assigned per guest. So right now with 16 cpus a single Niantic or Oplin port (10G) has 33 MSIX vectors. I brought this request to John because our validation group complained. On Linux they have a description for each interrupt and they want the same for FreeBSD. Welcome to the 21st century :) Jack On Thu, Oct 1, 2009 at 10:14 AM, Bruce Evans wrote: > On Thu, 1 Oct 2009, John Baldwin wrote: > > On Wednesday 30 September 2009 8:02:57 pm Bruce Evans wrote: >> >>> On Wed, 30 Sep 2009, John Baldwin wrote: >>> >>> 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 >>>> >>> >>> Interrupt names should be no longer than 4 (5 works sometimes) characters >>> so >>> that they can be displayed by systat -v. >>> >> >> For the machines this is targeted at (i.e. ones with devices using >> MSI/MSI-X) >> the number of interrupts is already well beyond what systat -v can >> currently >> display anyway. >> > > This should be fixed before expanding the names into descriptions. > > I wonder what uses all these interrupts. Most FreeBSD cluster machines use > a whole 3 interrupts apart from acpi_timer, with 1 barely active (1 disk, > 1 net, and 1 serial i/o probably only used for a serial console). My > workstations use about 10 plus timers, but most are usually inactive > except for net, keyboard and sometimes disk. Does anyone have systems > more than about 16 disk controllers and 16 network cards so as to need > more than 32 interrupts? > > I believe most folks use vmstat -i or ithread stats in top >> to measure real-time interrupts at this point. Possibly systat could grow >> a >> new interrupt-only mode that has sufficient room for full interrupt names. >> > > I don't find static info and thus vmstat -i very useful. vmstat with a > repeat interval is useful, but for some reason vmstat -i never supported > the repeat interval (its multi-line display is certainly unsuitable for > repetitions being readable), and with systat -v repetition in vmstat -i > is rarely missed. A repeating vmstat -i would have even more space > problems than systat -v, since it would want to repeat single line output. > > systat and most things just want a unique tag, not a description or even > a full name. The full name could be looked up from a tag by looking at > vmstat -i output which could show both. > > >> FYI, it actually looks decent enough running a 7.x systat on a test 9.0 >> kernel: >> >> 25000 frevn pdpgs 2000 cpu0: >> time >> intrn >> igb0:tx 0 >> Disks da0 pass0 473896 wire 25 >> igb0:rx 0 >> KB/t 0.00 0.00 13872 act >> igb0:link >> tps 0 0 10080 inact >> igb1:tx 0 >> MB/s 0.00 0.00 128 cache 1 >> igb1:rx 0 >> %busy 0 0 7603460 free >> igb1:link >> >> For these devices with MSI, the description (tx 0, tx 1, link, etc.) is >> actually more meaningful than the IRQ. >> > > The irq is probably least useful for most devices. > > The above is only reasonable because I changed systat to move "irqN: > " to " irqN" at the end. "irq256: bce0" on FreeBSD cluster machines > is displayed reasonably as "bce0 256". But systat shouldn't have to > do this. At least the form of the names used by systat (== the one > given by the old intrnames API) should have names that are carefully > phrased to have the most useful info first, and to not waste space > with ": " or even "irq". > > Bruce > > _______________________________________________ > freebsd-arch@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" > From owner-freebsd-arch@FreeBSD.ORG Thu Oct 1 17:54:19 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 DE11B106566B; Thu, 1 Oct 2009 17:54:19 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail01.syd.optusnet.com.au (mail01.syd.optusnet.com.au [211.29.132.182]) by mx1.freebsd.org (Postfix) with ESMTP id 7B8828FC15; Thu, 1 Oct 2009 17:54:19 +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 mail01.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n91HsF7u021930 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 2 Oct 2009 03:54:16 +1000 Date: Fri, 2 Oct 2009 03:54:15 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: John Baldwin In-Reply-To: <200910010953.33838.jhb@freebsd.org> Message-ID: <20091002031720.J21519@delplex.bde.org> References: <200909301732.20589.jhb@freebsd.org> <4AC4A567.7050204@icyb.net.ua> <200910010953.33838.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: arch@FreeBSD.org, Andriy Gapon 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 17:54:19 -0000 On Thu, 1 Oct 2009, John Baldwin wrote: > For the ithread name we are stuck with MAXCOMLEN. I would like to overhaul > the intrcnt stuff to possibly allow for longer names and be mostly MI (having > all the longs shared across cache lines that might be shared by multiple CPUs > isn't ideal either at this point). I am considering having either an array or > list of intrcnt structures with a name and a count with a sysctl that exports > an array for vmstat to use (the kvm bits could always rebuild the list using > the same logic as the sysctl handler for crash dumps). The current design is > very limiting and forces the weird space padding to make renaming intrcnt > descriptions manageable when adding/removing interrupt handlers. The design has few limits. My old implementation had no limits on name lengths. It just had a limit on the combined length, due to it allocating the string space statically. String spaces without padding require about 10 extra lines to create and zero extra lines to use (since the users already expect a string space so they already have the extra lines to walk over it). Changing the descriptions, including rebuilding the whole string space whenever an interrupt handler is added/removed/renamed shouldn't be a problem since this is a rare event. Just lock out the sysctl and other accesses to the string space while changing/reallocating the string space. Counters are harder -- you can't move them without locking out interrupt handlers that increment them. You could also delay rebuilding until the sysctl (wouldn't be so easy for kvm). The sysctl would take longer, but perhaps no longer than now since the data size should be much smaller -- instead of 100's of padded strings there should be only a few unpadded ones (the strings on ref8-i386 now consists of 49 "stray irqN" (padded), 42 unused "irqN:" (padded), one "???" (padded; unused I think -- this "???" is for when the table fills up and/or when an unexpected irq occurs, but the table now covers everything and has zillions of stray slots for unexpected ireq), and 15 lines for interrupts actually attached (8 lapic timer, 2 moderately used, 1 rarely used, 3 never used). systat wouldn't like the tables' sizes or string contents changing underneath it, but in the rare event that this happens it couldn't do worse than crash, and it could detect the change using a new generation count. vmstat wouldn't have any problems since it only reads the tables once (minor race between the independent sysctls). The kvm interface doesn't support dynamic table allocation. You would probably have to change it eventually to support per-CPU counters if you actually want to keep supporting interrupt stats in dead kernels. Bruce From owner-freebsd-arch@FreeBSD.ORG Thu Oct 1 18:27:10 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 6F3811065693 for ; Thu, 1 Oct 2009 18:27:10 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 3FE788FC1D for ; Thu, 1 Oct 2009 18:27:10 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id BAE5346B17; Thu, 1 Oct 2009 14:27:09 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id EF10A8A01F; Thu, 1 Oct 2009 14:27:08 -0400 (EDT) From: John Baldwin To: Bruce Evans Date: Thu, 1 Oct 2009 14:12:30 -0400 User-Agent: KMail/1.9.7 References: <200909301732.20589.jhb@freebsd.org> <200910010953.33838.jhb@freebsd.org> <20091002031720.J21519@delplex.bde.org> In-Reply-To: <20091002031720.J21519@delplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910011412.31250.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 01 Oct 2009 14:27:08 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: arch@freebsd.org, Andriy Gapon 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 18:27:10 -0000 On Thursday 01 October 2009 1:54:15 pm Bruce Evans wrote: > On Thu, 1 Oct 2009, John Baldwin wrote: > > > For the ithread name we are stuck with MAXCOMLEN. I would like to overhaul > > the intrcnt stuff to possibly allow for longer names and be mostly MI (having > > all the longs shared across cache lines that might be shared by multiple CPUs > > isn't ideal either at this point). I am considering having either an array or > > list of intrcnt structures with a name and a count with a sysctl that exports > > an array for vmstat to use (the kvm bits could always rebuild the list using > > the same logic as the sysctl handler for crash dumps). The current design is > > very limiting and forces the weird space padding to make renaming intrcnt > > descriptions manageable when adding/removing interrupt handlers. > > The design has few limits. My old implementation had no limits on > name lengths. It just had a limit on the combined length, due to it > allocating the string space statically. String spaces without padding > require about 10 extra lines to create and zero extra lines to use > (since the users already expect a string space so they already have > the extra lines to walk over it). Changing the descriptions, including > rebuilding the whole string space whenever an interrupt handler is > added/removed/renamed shouldn't be a problem since this is a rare > event. Just lock out the sysctl and other accesses to the string space > while changing/reallocating the string space. Counters are harder -- > you can't move them without locking out interrupt handlers that > increment them. I consider having to rebuild the entire namespace when changing one name a design limitation. I think it worked fine when you had machines without hotplug hardware (or drivers) where the set of interrupts in use was essentially built once during boot and static thereafter. However, that is no longer the machines we have. -- John Baldwin From owner-freebsd-arch@FreeBSD.ORG Thu Oct 1 18:27:11 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 3D5BD106568F for ; Thu, 1 Oct 2009 18:27:11 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id ED72B8FC1E for ; Thu, 1 Oct 2009 18:27:10 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 85AF646B1A; Thu, 1 Oct 2009 14:27:10 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id A5D408A020; Thu, 1 Oct 2009 14:27:09 -0400 (EDT) From: John Baldwin To: Bruce Evans Date: Thu, 1 Oct 2009 14:26:55 -0400 User-Agent: KMail/1.9.7 References: <200909301732.20589.jhb@freebsd.org> <200910010949.20849.jhb@freebsd.org> <20091002024550.X21519@delplex.bde.org> In-Reply-To: <20091002024550.X21519@delplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910011426.56047.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 01 Oct 2009 14:27:09 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: arch@freebsd.org 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 18:27:11 -0000 On Thursday 01 October 2009 1:14:01 pm Bruce Evans wrote: > On Thu, 1 Oct 2009, John Baldwin wrote: > > > On Wednesday 30 September 2009 8:02:57 pm Bruce Evans wrote: > >> On Wed, 30 Sep 2009, John Baldwin wrote: > >> > >>> 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 > >> > >> Interrupt names should be no longer than 4 (5 works sometimes) characters so > >> that they can be displayed by systat -v. > > > > For the machines this is targeted at (i.e. ones with devices using MSI/MSI-X) > > the number of interrupts is already well beyond what systat -v can currently > > display anyway. > > This should be fixed before expanding the names into descriptions. To me this change doesn't make systat any more or less broken than it was before, so I consider systat an orthogonal problem. > I wonder what uses all these interrupts. Most FreeBSD cluster machines use > a whole 3 interrupts apart from acpi_timer, with 1 barely active (1 disk, > 1 net, and 1 serial i/o probably only used for a serial console). My > workstations use about 10 plus timers, but most are usually inactive > except for net, keyboard and sometimes disk. Does anyone have systems > more than about 16 disk controllers and 16 network cards so as to need > more than 32 interrupts? As Jack mentioned, many newer devices are starting to take advantage of MSI to use multiple interrupts for a single device. A typical cxgb(4) adapter will use up to 9 interrupts (1 for link/misc, and 1 per-CPU for a RX/TX queueset). The Intel 10gb driver takes this even farther by giving each queueset separate RX/TX interrupts and it supports up to 16 queues giving up to 33 total interrupts per device. Even the igb(4) driver currently uses 1 interrupt for link, 1 for each RX queue, and 1 for each TX queue and it supports having at least 4 RX queues (possibly as many as 8?). Devices of this nature using lots of interrupts is also what drove the change to use per-CPU IDTs in 8.0 to increase the number of available IDT vectors for these types of devices that want MSI interrupts tied to every CPU. > > I believe most folks use vmstat -i or ithread stats in top > > to measure real-time interrupts at this point. Possibly systat could grow a > > new interrupt-only mode that has sufficient room for full interrupt names. > > I don't find static info and thus vmstat -i very useful. vmstat with a > repeat interval is useful, but for some reason vmstat -i never supported > the repeat interval (its multi-line display is certainly unsuitable for > repetitions being readable), and with systat -v repetition in vmstat -i > is rarely missed. A repeating vmstat -i would have even more space > problems than systat -v, since it would want to repeat single line output. For certain tests simply doing a before and after of vmstat -i and figuring out the diff manually (sometimes just having a diff at all is important rather than the number (e.g. did some action I just did generate an interrupt?)) is sufficient. > systat and most things just want a unique tag, not a description or even > a full name. The full name could be looked up from a tag by looking at > vmstat -i output which could show both. This could be interesting perhaps. I would probably want to change my proposed intrcnt structure to contain three things then: a unique tag, a full name, and a count. One possible idea for the unique "tag" would be to use the interrupt handler name if there is only a single handler or to use the 'irqXXX' name if the interrupt is shared. -- John Baldwin From owner-freebsd-arch@FreeBSD.ORG Thu Oct 1 20:41:22 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 BC8B9106568D; Thu, 1 Oct 2009 20:41:22 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail01.syd.optusnet.com.au (mail01.syd.optusnet.com.au [211.29.132.182]) by mx1.freebsd.org (Postfix) with ESMTP id 590A08FC26; Thu, 1 Oct 2009 20:41:21 +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 mail01.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n91KfJZK000711 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 2 Oct 2009 06:41:20 +1000 Date: Fri, 2 Oct 2009 06:41:19 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: John Baldwin In-Reply-To: <200910011412.31250.jhb@freebsd.org> Message-ID: <20091002053705.F21979@delplex.bde.org> References: <200909301732.20589.jhb@freebsd.org> <200910010953.33838.jhb@freebsd.org> <20091002031720.J21519@delplex.bde.org> <200910011412.31250.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: arch@freebsd.org, Andriy Gapon 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 20:41:22 -0000 On Thu, 1 Oct 2009, John Baldwin wrote: > On Thursday 01 October 2009 1:54:15 pm Bruce Evans wrote: >> >> The design has few limits. My old implementation had no limits on >> name lengths.... > > I consider having to rebuild the entire namespace when changing one name > a design limitation. I think it worked fine when you had machines without > hotplug hardware (or drivers) where the set of interrupts in use was > essentially built once during boot and static thereafter. Those probably didn't have anything as sophisticated as building it at boot time. In 4.4BSD-Lite2 it is just hard-coded into locore for hp300, sparc, luna64 and pmax, while for news3400 it is partially declared but not defined. It is missing even declarations for all other arches including i386, and pmax has a comment saying that the counters aren't used (perhaps they aren't used for any arch). I fixed this for i386. > However, that > is no longer the machines we have. Who cares if you have to rebuild the entire namespace occasionally. Any sort of dynamic allocation would need to rebuild it to extend it. String spaces are very easy to expand since they don't have any internal pointers and shouldn't have many external ones. Anyway, the design doesn't require rebuilding the namespace for all changes. My old implementation usually adds to the end of the string space using statically allocated space. There are external pointers that keep the names indexed consistently with the counters. New interrupts normally get a new slot in intrcnt[]. Old slots are intentionally not reused, except by devices with the same interrupt name. They preserve the names and interrupt counts of previously attached devices. Now, I think the intrcnt[] index is identical with the interrupt number, and old driver names are lost and old interrupt counts are merged (zeroed?) when a slot is reused. The old implementation also handles sparsely allocated interrupt numbers (which are just starting to become common) nicely without sparsely allocating all the tables. Now the tables use sparse allocation for an enormous number of slots. There seem to be 256 slots for non-MSI and another 512 for MSI giving a basic 768. This is then doubled to give slots for stray interrupts, and there are a few special-purpose slots, giving a total of a little more than 1536. This gives a string space size of about 32K. To simplify the implementation, the space for MSI and several APICs is allocated unconditionally. Here is the 4.4BSD-Lite2 code for hp300: % .globl _intrcnt,_eintrcnt,_intrnames,_eintrnames % _intrnames: % .asciz "spur" % .asciz "hil" % .asciz "lev2" % .asciz "lev3" % .asciz "lev4" % .asciz "lev5" % .asciz "dma" % .asciz "clock" % .asciz "statclock" % .asciz "nmi" % _eintrnames: % .even % _intrcnt: % .long 0,0,0,0,0,0,0,0,0,0 % _eintrcnt: This takes 53 bytes (plus 1 or 3 for padding) for the string space. Most machines still need about 53 bytes for the string space (don't waste slots to count or name stray interrupts separately). These 53 bytes can be built and processed by userland on every sysctl much faster than the 32K of mostly-unused bytes can even be copied out. Bruce From owner-freebsd-arch@FreeBSD.ORG Fri Oct 2 13:30:10 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 963DF106566B for ; Fri, 2 Oct 2009 13:30:10 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 6670A8FC15 for ; Fri, 2 Oct 2009 13:30:10 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id EFBAA46B06; Fri, 2 Oct 2009 09:30:09 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 06D228A021; Fri, 2 Oct 2009 09:30:09 -0400 (EDT) From: John Baldwin To: Bruce Evans Date: Fri, 2 Oct 2009 09:30:00 -0400 User-Agent: KMail/1.9.7 References: <200909301732.20589.jhb@freebsd.org> <200910011412.31250.jhb@freebsd.org> <20091002053705.F21979@delplex.bde.org> In-Reply-To: <20091002053705.F21979@delplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910020930.01228.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 02 Oct 2009 09:30:09 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: arch@freebsd.org, Andriy Gapon 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: Fri, 02 Oct 2009 13:30:10 -0000 On Thursday 01 October 2009 4:41:19 pm Bruce Evans wrote: > On Thu, 1 Oct 2009, John Baldwin wrote: > > > On Thursday 01 October 2009 1:54:15 pm Bruce Evans wrote: > >> > >> The design has few limits. My old implementation had no limits on > >> name lengths.... > > > > I consider having to rebuild the entire namespace when changing one name > > a design limitation. I think it worked fine when you had machines without > > hotplug hardware (or drivers) where the set of interrupts in use was > > essentially built once during boot and static thereafter. > > Those probably didn't have anything as sophisticated as building it at > boot time. In 4.4BSD-Lite2 it is just hard-coded into locore for hp300, > sparc, luna64 and pmax, while for news3400 it is partially declared but > not defined. It is missing even declarations for all other arches > including i386, and pmax has a comment saying that the counters aren't > used (perhaps they aren't used for any arch). I fixed this for i386. > > > However, that > > is no longer the machines we have. > > Who cares if you have to rebuild the entire namespace occasionally. > Any sort of dynamic allocation would need to rebuild it to extend it. > String spaces are very easy to expand since they don't have any internal > pointers and shouldn't have many external ones. > > Anyway, the design doesn't require rebuilding the namespace for all > changes. My old implementation usually adds to the end of the string > space using statically allocated space. There are external pointers > that keep the names indexed consistently with the counters. New > interrupts normally get a new slot in intrcnt[]. Old slots are > intentionally not reused, except by devices with the same interrupt > name. They preserve the names and interrupt counts of previously attached > devices. Now, I think the intrcnt[] index is identical with the interrupt > number, and old driver names are lost and old interrupt counts are merged > (zeroed?) when a slot is reused. > > The old implementation also handles sparsely allocated interrupt numbers > (which are just starting to become common) nicely without sparsely > allocating all the tables. Now the tables use sparse allocation for > an enormous number of slots. There seem to be 256 slots for non-MSI and > another 512 for MSI giving a basic 768. This is then doubled to give > slots for stray interrupts, and there are a few special-purpose slots, > giving a total of a little more than 1536. This gives a string space > size of about 32K. To simplify the implementation, the space for MSI > and several APICs is allocated unconditionally. Some of this simplification can actually be undone now. We can probably wait to allocate an interrupt event for x86 interrupts until the first interrupt handler is installed and defer allocating intrcnt's until then. There were reasons why we always allocated ithreads back before interrupt events that I don't recall now. I'm also not sure we really need separate stray interrupt counts either at this point as stray interrupts are extremely rare. A single stray counter might suffice at this point. However, all of this is still orthogonal to interrupt description strings. > Here is the 4.4BSD-Lite2 code for hp300: > > % .globl _intrcnt,_eintrcnt,_intrnames,_eintrnames > % _intrnames: > % .asciz "spur" > % .asciz "hil" > % .asciz "lev2" > % .asciz "lev3" > % .asciz "lev4" > % .asciz "lev5" > % .asciz "dma" > % .asciz "clock" > % .asciz "statclock" > % .asciz "nmi" > % _eintrnames: > % .even > % _intrcnt: > % .long 0,0,0,0,0,0,0,0,0,0 > % _eintrcnt: > > This takes 53 bytes (plus 1 or 3 for padding) for the string space. > Most machines still need about 53 bytes for the string space (don't > waste slots to count or name stray interrupts separately). These 53 > bytes can be built and processed by userland on every sysctl much > faster than the 32K of mostly-unused bytes can even be copied out. I think this mostly serves to prove the point that the existing design is tailored to static configurations, not dynamic ones. -- John Baldwin From owner-freebsd-arch@FreeBSD.ORG Fri Oct 2 13:40:07 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 C5D951065672 for ; Fri, 2 Oct 2009 13:40:07 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from swip.net (mailfe05.swip.net [212.247.154.129]) by mx1.freebsd.org (Postfix) with ESMTP id 5563E8FC21 for ; Fri, 2 Oct 2009 13:40:06 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=R7RkaEpAGPMA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=YFYyjzJCz5C0nR1_5wMA:9 a=2kDq1sHdSoJqLOPcaCDUJ2JvcjAA:4 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe05.swip.net (CommuniGate Pro SMTP 5.2.16) with ESMTPA id 1214094592; Fri, 02 Oct 2009 14:40:04 +0200 Received-SPF: softfail receiver=mailfe05.swip.net; client-ip=188.126.201.140; envelope-from=hselasky@freebsd.org From: Hans Petter Selasky To: freebsd-current@freebsd.org Date: Fri, 2 Oct 2009 14:40:48 +0200 User-Agent: KMail/1.11.4 (FreeBSD/9.0-CURRENT; KDE/4.2.4; i386; ; ) References: In-Reply-To: X-Face: (%:6u[ldzJ`0qjD7sCkfdMmD*RxpOwEEQ+KWt[{J#x6ow~JO:,zwp.(t; @Aq :4:&nFCgDb8[3oIeTb^'",;u{5{}C9>"PuY\)!=#\u9SSM-nz8+SR~B\!qBv MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910021440.50021.hselasky@freebsd.org> Cc: arch@freebsd.org, Robert Watson Subject: Re: [libdispatch-dev] GCD libdispatch w/Blocks support working on Free (f 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: Fri, 02 Oct 2009 13:40:07 -0000 Hi, Can the Apple's "Blocks" C language extension be used when programming in the kernel? Or is this a user-space only feature? --HPS