spl5() call in kern_exit.c
Brian Thomson
thomson at uthub.UUCP
Tue Sep 18 07:02:32 AEST 1984
In 4.2BSD a network interface may allocate page(s) of memory
for an incoming datagram during interrupt service.
So, at least an splimp() is necessary and should indeed be
done before (not after) the vrelu() in exit().
An spl6() isn't necessary because the callouts are done at softclock
interrupt time, which is a very low interrupt priority.
However, all is not rosy.
Note that exit() calls swtch(), which will remain on the current
kernel stack and drop the cpu priority to 0 in its idle loop.
Now an interface may interrupt, allocate part of the current
u area for mbuf or mcluster use, fill it with good stuff,
then wake up a process. On return from the interrupt, swtch()
finds a runnable process and falls into resume(), which
cheerfully saves the current process context smack on top of
the newly gathered good stuff.
Cheer up, though, the scenario is even worse when ported to
processors that don't have a separate interrupt stack.
--
Brian Thomson, CSRI Univ. of Toronto
{linus,ihnp4,uw-beaver,floyd,utzoo}!utcsrgv!uthub!thomson
More information about the Comp.unix.wizards
mailing list