Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 beta 3/9/83; site uthub.UUCP Path: utzoo!utcsrgv!utai!uthub!thomson From: thomson@uthub.UUCP (Brian Thomson) Newsgroups: net.unix-wizards Subject: Re: spl5() call in kern_exit.c Message-ID: <177@uthub.UUCP> Date: Mon, 17-Sep-84 17:02:32 EDT Article-I.D.: uthub.177 Posted: Mon Sep 17 17:02:32 1984 Date-Received: Mon, 17-Sep-84 19:01:46 EDT References: <785@opus.UUCP> Organization: CSRG, University of Toronto Lines: 21 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