From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 17 20:49:27 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5EFA106566C for ; Wed, 17 Feb 2010 20:49:27 +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 782FF8FC08 for ; Wed, 17 Feb 2010 20:49:27 +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 2920746B66; Wed, 17 Feb 2010 15:49:27 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 62E7B8A025; Wed, 17 Feb 2010 15:49:26 -0500 (EST) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Wed, 17 Feb 2010 14:17:24 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20100120; KDE/4.3.1; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201002171417.24951.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 17 Feb 2010 15:49:26 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Andrew Brampton Subject: Re: Per core, per device interrupt counts X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 20:49:27 -0000 On Wednesday 17 February 2010 1:09:04 pm Andrew Brampton wrote: > After reading though the kernel source I realise what I want isn't > implemented at the moment but I wanted to discuss if this feature > would be an useful addition. > > Basically I want to see counts of how many interrupts for a particular > interrupt have fired on each core. Linux has provided this kind of > information for a while and I've found it quite useful. I would like > this information when I am pinning particular interrupts to one (or > more cores). This is useful when I'm tweaking a system with, for > example, 10Gig network cards which have multiple queues (thus multiple > IRQs). > > Having a look in the kernel I see that the count is kept in the > is_count field of the intsrc struct. This field seems to be backed by > the global intrcnt array. Could this be modified to perhaps use the > new PCPU macros, so there is a different count for each core? If I was > given a few pointers I might find time to implement this myself. The simplest method would probably be to make intrcnt grow per-CPU counts, but that would change the ABI of intrcnt and require a good bit of userland hacking to fix vmstat -i, etc. -- John Baldwin