Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Feb 2010 14:17:24 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-hackers@freebsd.org
Cc:        Andrew Brampton <brampton+freebsd@gmail.com>
Subject:   Re: Per core, per device interrupt counts
Message-ID:  <201002171417.24951.jhb@freebsd.org>
In-Reply-To: <d41814901002171009l16bd40e7j1970d01bc8f44fd7@mail.gmail.com>
References:  <d41814901002171009l16bd40e7j1970d01bc8f44fd7@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002171417.24951.jhb>