*BSD News Article 13036


Return to BSD News archive

Newsgroups: comp.os.386bsd.bugs
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!howland.reston.ans.net!zaphod.mps.ohio-state.edu!wupost!decwrl!netcomsv!netcom.com!jtk
From: jtk@netcom.com (Jane Valencia)
Subject: Re: Excessive Interrupt Latencies
Message-ID: <1993Mar20.011150.4650@netcom.com>
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
References: <1993Mar19.221353.14068@netcom.com>
Date: Sat, 20 Mar 1993 01:11:50 GMT
Lines: 34

thinman@netcom.com (Technically Sweet) writes:

>My experience hacking the at&t unixes for 286 and 386 for the
>past 6 years has convinced me that emulating the pdp-11 SPL tower 
>is silly.  

I'll give a cautious second to this.  When I started doing the I/O
sections of my microkernel I decided to use the interrupt mask of
the PIC only for purposes of globally enabling interrupts--i.e.,
when a server registers for an IRQ then that IRQ is enabled, otherwise
it is left masked at the PIC.

Since the machine-independent parts of my microkernel is written for a
multiprocessor, I unified the "spl" concept with spinlock mutexing.
Given my design decision WRT the PIC, the result is that spinlocks
either do not block any interrupts (and thus only work between top
halves of competing kernel threads) or block all interrupts (and thus
can coordinate between top and bottom halves--but keep it short!)

The result is pretty good, at least on an i386.  I'm pretty sure these
techniques would fall apart if I had to take them back to an 11/03, but
that just doesn't seem to be the direction we're going, does it? :-)
If it all blows up in my face, I'll be back with a post-mortem.

BTW, if anybody noticed all the stray interupts coming in via the lpt1:
IRQ vector.  Turns out these are caused by the way 386BSD does the EOI
to the pair of PICs.  If you want to see something interesting, mask
out the IRQ on the first PIC which chains to the second PIC (IRQ4, I think).
The stray interrupts will stop arriving.  Hard to do unless you're
floppy based, which is what I was at the time.  I think there's a directed
EOI which might fix the problem.

				Regards... Andy Valencia