From owner-freebsd-stable@FreeBSD.ORG Mon Nov 15 17:05:46 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A902106566B for ; Mon, 15 Nov 2010 17:05:46 +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 1B4CE8FC17 for ; Mon, 15 Nov 2010 17:05:46 +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 BB68B46B0C; Mon, 15 Nov 2010 12:05:45 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A601B8A01D; Mon, 15 Nov 2010 12:05:44 -0500 (EST) From: John Baldwin To: freebsd-stable@freebsd.org Date: Mon, 15 Nov 2010 11:38:58 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20101102; KDE/4.4.5; amd64; ; ) References: <4CE157EC.6010007@sentex.net> In-Reply-To: <4CE157EC.6010007@sentex.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201011151138.58149.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Mon, 15 Nov 2010 12:05:44 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: Subject: Re: interrupt resource clean up X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 17:05:46 -0000 On Monday, November 15, 2010 10:55:24 am Mike Tancsa wrote: > While trying to debug an issue with an em nic, I noticed that if I > unload the kld which previously had the nic using multiple msi > interrupts, and then load it with msix disabled, vmstat -i shows some > funny output > > e.g. before > > interrupt total rate > irq4: uart0 37945 0 > irq16: siis0 90443357 55 > irq18: arcmsr0 138839249 84 > irq19: bge0 twa0 4642943 2 > irq21: ehci0 11565862 7 > irq23: ehci1 3279942 2 > cpu0: timer 3279559638 2000 > irq256: em0 1609329648 981 > irq257: em1:rx 0 756066703 461 > irq258: em1:tx 0 595711018 363 > irq259: em1:link 41186 0 > irq260: ahci0 94752814 57 > cpu1: timer 3279552436 2000 > cpu3: timer 3279552195 2000 > cpu2: timer 3279550937 2000 > Total 16422925873 10015 > > > and after > > # vmstat -i > interrupt total rate > irq4: uart0 42144 0 > irq16: siis0 93796258 54 > irq18: arcmsr0 144244159 83 > irq19: bge0 twa0 4840729 2 > irq21: ehci0 12015466 6 > irq23: ehci1 3436876 2 > cpu0: timer 3436486096 2000 > irq256: em0 1719107713 1000 > irq257: em1 767271792 446 > irq258: 605077993 352 > irq259: 41186 0 > irq260: ahci0 98454608 57 > cpu1: timer 3436478875 2000 > cpu3: timer 3436478653 2000 > cpu2: timer 3436477132 2000 > Total 17194249680 10007 > > Is this just a display issue, or are the resources still allocated ? The interrupt doesn't go away when you unload the driver and it's historical count doesn't go away. vmstat -i just hides interrupts with a count of zero, but unloading the driver doesn't zero the count, so it will stay there forever. It might get reused by a different driver that uses MSI or MSI-X if you were to kldload said driver. -- John Baldwin