Subject: Re: i386 interrupt counters
To: Michael Graff <explorer@flame.org>
From: Noriyuki Soda <soda@sra.co.jp>
List: tech-kern
Date: 08/14/1996 04:58:07
>>>>> On 12 Aug 1996 16:46:20 -0400,
	Michael Graff <explorer@flame.org> said:

>> (2) It screws up the totals.
>> 
>> Any scheme which doesn't bother to take hierarchy into account will do
>> (2)...

> Would it be possible to, somehow, build a hierachy by calling the event
> attach routine with some handle to the parent's counter?

I think it would not work.
Please consider following case...

PCI shared IRQ:
	Both device A and device B use same irq.
	Both devices raise interrupt at the almost same time.
	CPU receives only one interrupt (PCI interrupt is level triggered
		wired OR). NetBSD's interrupt handling routine calls
		both A's interrupt handler and B's interrupt handler.
	So, not always
		(A's interrupt count) + (B's interrupt count) ==
			(total interrupt count on the irq)
	But always
		(A's interrupt count) + (B's interrupt count) >=
			(total interrupt count on the irq)

multi-port serial card:
	multi-port serial card provides com2 and com3
	Both com2 and com3 receives the character at the almost same time.
	multi-port serial card raises interrupt, so ttys which are attached
		to com2 and com3 receive characters
	So, not always
		(interrupt count for com2) + (interrupt count for com3) ==
			(total interrupt count of the card)
	But always
		(interrupt count for com2) + (interrupt count for com3) >=
			(total interrupt count of the card)

Hierachy of interrupt counter screws up the totals, too.
Probably, old-style style counter is suitable for the totals.
--
soda@sra.co.jp		Software Research Associates, Inc., Japan
(Noriyuki Soda)		   software tools and technology group