Date: Mon, 29 Nov 1999 09:10:40 -0800 (PST) From: Matthew Dillon <dillon@apollo.backplane.com> To: John Polstra <jdp@polstra.com> Cc: current@freebsd.org Subject: Re: Route table leaks Message-ID: <199911291710.JAA06637@apollo.backplane.com> References: <199911220150.UAA78559@khavrinen.lcs.mit.edu> <199911221552.KAA84691@khavrinen.lcs.mit.edu> <199911270141.RAA29416@vashon.polstra.com> <199911280243.SAA40107@apollo.backplane.com> <199911291651.IAA01330@vashon.polstra.com>
next in thread | previous in thread | raw e-mail | index | archive | help
:> :> Yes. Because the route table may be flushed from an interrupt in :> a low memory situation. : :I guess I didn't state the question very well. I realize that RTFREE :has to be executed at splnet. But I think it's likely that rtalloc :and rtalloc_ign are always called at splnet or better. If that's the :case and it's already required, then adding the redundant splnet calls :would be obfuscatory. I'd rather add a comment instead. I ran across this situation in a number of places while fixing the VM system. If you want to get rid of the splnet() calls you have to document the procedure containing the calls in the comments above the procedure, adding something like: /* * fubar: fubar the kernel * * This procedure must be called at splnet() * This procedure does not block * This procedure must .... */ And then make sure that all calls to the procedure indeed occur at splnet(). Then you can get rid of the splnet() calls within the procedure. For examples of the type of documentation necessary, look at vm/swap_pager.c. So what it comes down to are the requirements you wish to impose on the official use of the procedure. Note that making spl*() calls when the current process is already at that spl level do not impose any real overhead. : :John :-- : John Polstra jdp@polstra.com -Matt Matthew Dillon <dillon@backplane.com> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199911291710.JAA06637>