Subject: Re: scsi kernel crashes - sbc & ncrscsi (long)
To: Hauke Fath <saw@sun0.urz.uni-heidelberg.de>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: port-mac68k
Date: 06/14/1996 15:13:19
On Thu, 13 Jun 1996 23:43:46 +0100
saw@sun0.urz.uni-heidelberg.de (Hauke Fath) wrote:
[ Scott sez...]
> >Thanks to Jason Thorpe for pointing this out. (HI JASON! :-)
sure ... Looking at the code, that panic just stunk of unwanted reentrance.
[ Hauke sez...]
> YEA!
>
> This helped :-)
> -- for the sbc driver, that is. ncrscsi kernels still don't run on my se/30.
Is it the _same_ panic with ncrscsi kernels? If moving splimp -> spl4
``fixes'' the bug for kernels with an sbc driver, it really ought to do
the same thing for ncrscsi...
splimp is supposed to prevent reentrancy for routines that deal with
memory allocation and management. I.e. malloc() runs at splimp, parts of
pmap run at splimp, etc. This is a hysterical name left over from the
days of Internet Message Processors ... If I remember how it worked
correctly, you basically needed to allocate the mbuf for an incoming
packet, and had to keep the IMP from interrupting while you did this
(because, if it did, you'd have to allocate an mbuf ... there's the
unwated reentrance), thus splimp. This is why, in the early days of
NetBSD, the network interface drivers had calls to splimp() (splnet was,
in those days, used to block the network software interrupts).
NetBSD has since changed the definition of splnet to be defined as
"blocks network hardware interrupts" and introduced splsoftnet, which is
defined as "blocks network software interrupts". splimp is, in its
present state, poorly named :-)
So, to get back to my point, really splimp needs to block anything that
could potentially do memory allocation ... or, in this case, frob
(possibly in some non-obvious way) the pmap module...
ciao.
-- save the ancient forests - http://www.bayarea.net/~thorpej/forest/ --
Jason R. Thorpe thorpej@nas.nasa.gov
NASA Ames Research Center Home: 408.866.1912
NAS: M/S 258-6 Work: 415.604.0935
Moffett Field, CA 94035 Pager: 415.428.6939