Tommy Hallgren wrote: > Hi! > > I'm reading http://www.BSDI.COM/products/internet/40-qna.mhtml#Q5 and found t he > following peice of text: > > "Lazy SPLs - The kernel no longer masks hardware events unless a hardware eve nt > actually occurs, avoiding many expensive operations." > > Does anyone know what this is?
Exactly what it says.. We've been doing it for as long as I can remember, at least as far back as 2.0.5, probably as far back as 1.x. What it means is that in a section of code like this: s = splbio(); foo(); splx(s); .. the hardware interrupt masks in the icu's are not changed unless an interrupt happens that should have been masked. The handler checks the mask and finds that it isn't allowed. The hardware is then masked for real and the interrupt handler returns without going further. When a lowering of the priority causes a previously deferred interrupt to become unmasked then it's handler will be executed. revision 1.7 date: 1994/04/02 07:00:50; author: davidg; state: Exp; lines: +94 -102 ^^^^^^^^^^ New interrupt code from Bruce Evans. [..] /usr/src/sys/i386/isa/icu.s: o Software interrupts (SWIs) and delayed hardware interrupts (HWIs) are now handled uniformally, and dispatching them from splx() is more like dispatching them from _doreti. The dispatcher is essentially *(handler[ffs(ipending & ~cpl)](). In fact, it even looks like rev 1.1 of these files had lazy spls: revision 1.1.1.1 date: 1993/06/12 14:58:01; author: rgrimes; state: Exp; lines: +0 -0 Initial import, 0.1 + pk 0.2.4-B1 .. that's even before FreeBSD 1.0. Cheers, -Peter To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-hackers" in the body of the message