Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 May 1999 19:41:46 +0800
From:      Peter Wemm <peter@netplex.com.au>
To:        Tommy Hallgren <thallgren@yahoo.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Lazy SPLs 
Message-ID:  <19990520114148.9EF951F5A@spinner.netplex.com.au>
In-Reply-To: Your message of "Thu, 20 May 1999 00:23:34 MST." <19990520072334.17741.rocketmail@web124.yahoomail.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
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 majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990520114148.9EF951F5A>