Subject: New spl level: splsched()
To: None <tech-kern@NetBSD.ORG>
From: Charles M. Hannum <>
List: tech-kern
Date: 03/02/1997 21:55:15
After much consideration, I've come to the conclusion that we need
another spl level, tentatively named splsched().

The purpose of this spl level is to block all interrupts which may
affect run queues or other scheduling-related data structures --
including anything that may call timeout() or wakeup(), manipulate
signal masks or register signals, etc.

The idea is that most things which currently use splhigh() will then
use splsched().  This allows splhigh() to continue blocking all
interrupts (although it will only be used in a small number of places,
like DDB), but (`fast') interrupt routines which are constructed to
not manipulate the aforementioned data structures need not be blocked
in places where splsched() is used.  This will in turn lower interrupt
latency for things like serial devices.

In case anyone's curious, yes, it's true that splclock() is sort of
intended for this.  However, on at least the mac68k port, splclock()
doesn't block a bunch of hardware interrupts that *do* need to be
blocked by splsched(), because the clock device uses a lower hardware
interrupt priority.  There are probably other ports where this is true
as well (but I haven't checked).  The mac68k port probably can't take
advantage of the separation of splsched(), but that's no reason the
rest of us shouldn't.

I plan to implement this some time this week, so if you see a problem
with it, speak up now!