Subject: Re: spl naming etc
To: None <>
From: Charles Hannum <>
List: tech-kern
Date: 01/02/1996 20:06:04
   So, what we need to do is ask:
    - does lots of people / drivers / other bsd operating systems assume
   splimp() can/should be used to block malloc, and use it for that purpose?
   [I don't know the answer to this.]

   If not, we *can* split splimp() into slightly modified splimp() blocking
   net/tty, and splmalloc() blocking 'all-drivers-using-malloc()' (whatever
   that may mean).  Of course, on many machines these two might have the
   same implementation, but if there are some machines where it makes for
   a huge win, it should be considered.  I don't know whether it would be
   a huge win, a small win, or no win at all.

>From a purist perspective, this might be nice, but in all cases I know
of, bio interrupts are lower priority than either network or tty
interrupts, so there's no practical reason to do it.

   However, if the current dual-purpose splimp() is kept, it needs to
   be documented as such, since it seems most people [including me, after
   having read a bit in the Stevens/Wright book] assumed it did just b) above.
   I'll volunteer to write the man page.

Indeed; I started on a general spl*(9) man page.

   Now what about another (maybe stupid) idea:  Most boxes doesn't
   necessarily run slip or ppp at all.  What about making splimp() not
   block tty interrupts if slip/ppp is not configured?  This *might*
   be a huge win on many machines for serial port reliability, which
   would be nice for driving printers / terminals.  [Of course, you need
   serial port reliability when using slip/ppp too!]

Two comments on this:

1) You have the risk of phantom bugs that appear or disappear when
someone adds or removes {SLIP,PPP}.  This sort of thing has happened

2) The regions where splimp() is used are fairly small, so it's not at
all clear that this would actually buy you anything.

Again, I don't see a practical reason to do this.

As I pointed out earlier, a better way to fix this whole problem would
be to make device drivers run in threads, and use finer-grain locking
primitives.  (For example, this would mean that ttys not being used
for SLIP or PPP would never lock against malloc().)  The spl model is
really a holdover from the VAX.