Per core, per device interrupt counts

John Baldwin jhb at
Wed Feb 17 20:49:27 UTC 2010

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

More information about the freebsd-hackers mailing list