Subject: Re: i386 interrupt counters
To: Chris G Demetriou <Chris_G_Demetriou@ux2.sp.cs.cmu.edu>
From: Noriyuki Soda <firstname.lastname@example.org>
Date: 08/13/1996 04:23:07
> My point is, 'evcnt' by itself just isn't sufficient to get you all
> the information you want.
I agree, especially about stray interrupt counter.
> > Why don't you think that evcnt can be handled by bus code ?
> > (evcnt_attach() on xxx_intr_establish(), and dealing with interrupt
> > handler's return value on bus level interrupt accounting routine)
> (1) the first argument is a struct device *, which would mandate
> changing the calling interfaces for all (except possibly tc; i forget
> what that looks like) xxx_intr_establish() functions.
How do you think about changing last argument of
xxx_intr_establish() and argument of interrupt handler from
(void *) to (struct device *) ?
On i386, it is straightforward except few devices. (clock,
npx, if_fea, ...)
Or, how about adding another argument (struct device *) to
> (2) if you do it in xxx_intr_establish, then you have no way of
> knowing if a device has already done an xxx_intr_establish, i.e. the
> device may already have an 'intr' counter. There _are_ existing
> devices that use two IRQs, even if the code in our tree can't handle
> them. they should not be ignored.
I think it is not problem. Multiple evcnt_attach() in same
device is not harmfull both kernel and vmstat.
> (3) where do you get the storage for the evcnt? per-interrupt-line?
> you lose, if you have interrupt sharing.
one evcnt per "struct intrhand".
> (4) what do you do for 'weird' cases, like multi-port serial cards,
> where you potentially want to know how often each 'com' thinks it
> took an interrupt (to see load on each port), how often each _card_
> took an interrupt (to see if you want to reassign a serial line to
> another card, i.e. swap cables with a more lightly loaded line), and
> how often the IRQ took an interrupt (to see if you want to move the
> card to a different IRQ, if it's shared).
each 'com': In this case, driver level accounting is needed,
and it is not in my scope.
each 'card': accounting on "struct intrhand" can cope with this.
each IRQ: old style counter is needed.
> So, in my opinion, the "Right" thing to do is fix evcnt interrupt
> counters to be more useful, and, failing that, just use old-style
How about using both evcnt (per intrhand) and old-style counter (per line) ?
email@example.com Software Research Associates, Inc., Japan
(Noriyuki Soda) software tools and technology group