Date: Fri, 1 Jun 2007 12:17:31 +0100 (BST) From: Robert Watson <rwatson@FreeBSD.org> To: current@FreeBSD.org Subject: Re: NET_NEEDS_GIANT removal Message-ID: <20070601121347.M77697@fledge.watson.org> In-Reply-To: <20070601105521.D77697@fledge.watson.org> References: <20070601105521.D77697@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 1 Jun 2007, Robert Watson wrote: > This is the compatibility code that allows non-MPSAFE network protocols to > operate--when they are compiled into the kernel, Giant is forced over the > entire network stack. This allows them to run moderately safely, but > eliminates use of more than one processor at a time in any part of the > network stack, as well as increasing contention on Giant for any other > non-MPSAFE components, requiring Giant be acquired in possible shared > ithreads, etc. The components currently requiring Giant are: For those wondering what the results of this look like, I've start putting together an initial patch to remove the following compatibility shim parts associated with debug.mpsafenet: - NET_NEEDS_GIANT() - NET_LOCK_GIANT(), NET_UNLOCK_GIANT(), NET_ASSERT_GIANT() - NET_CALLOUT_MPSAFE - debug_mpsafenet The draft is here: http://www.watson.org/~robert/freebsd/netperf/20070601-de_mpsafenet.diff It does not yet compile (and it not tested), as parts requiring NET_NEEDS_GIANT() haven't been removed/disabled yet, but does begin to give a sense of how removing these shims cleans up many complex code paths. Among other things, it removes 11 goto's in the socket exception handling code. Robert N M Watson Computer Laboratory University of Cambridge
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070601121347.M77697>