From owner-freebsd-current Mon Nov 29 9:10:47 1999 Delivered-To: freebsd-current@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 0859A14C37 for ; Mon, 29 Nov 1999 09:10:43 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id JAA06637; Mon, 29 Nov 1999 09:10:40 -0800 (PST) (envelope-from dillon) Date: Mon, 29 Nov 1999 09:10:40 -0800 (PST) From: Matthew Dillon Message-Id: <199911291710.JAA06637@apollo.backplane.com> To: John Polstra Cc: current@freebsd.org Subject: Re: Route table leaks 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> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :> :> 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message