From owner-freebsd-arch@FreeBSD.ORG Fri Jul 4 00:30:19 2008 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF4D2106566C; Fri, 4 Jul 2008 00:30:19 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 4A03B8FC20; Fri, 4 Jul 2008 00:30:19 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id A7DAF46C1A; Thu, 3 Jul 2008 20:30:18 -0400 (EDT) Date: Fri, 4 Jul 2008 01:30:18 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: arch@FreeBSD.org, net@FreeBSD.org In-Reply-To: <20080526102345.G26343@fledge.watson.org> Message-ID: <20080704012901.U90881@fledge.watson.org> References: <20080526102345.G26343@fledge.watson.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: Re: Remaining non-MPSAFE netisr handlers X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jul 2008 00:30:19 -0000 On Mon, 26 May 2008, Robert Watson wrote: > In the continuing campaign to eliminate the Giant lock from the dregs of the > network stack, I thought I'd send out a list of non-MPSAFE netisr handlers: > > Location Handler Removed with IFF_NEEDSGIANT > dev/usb/usb_ethersubr.c:120 usbintr Yes > net/if_ppp.c:277 pppintr Yes > netinet6/ip6_input.c ip6_input No > > The plan for 8.0 is to remove the NETISR_MPSAFE flag -- all netisr handlers > will be executed without the Giant lock. This doesn't prohibit acquiring > Giant in the handler if required, although that's undesirable for the > obvious reasons (potentially stalling interrupt handling, etc). Obviously, > what would be most desirable is eliminating the remaining requirement for > Giant in the IPv6 input path, primarily consisting of mld6 and nd6. > > With this in mind, my current plan is to remove the flag and add explicit > Giant acquisition for any remaining handlers in June when IFF_NEEDSGIANT > device drivers are disabled. I've now removed the NETISR_MPSAFE flag -- all netisr handlers are now assumed to DTRT with respect to locking. At least until usb and ppp are sorted out, I've introduced NETISR_FORCEQUEUE as an interim measure, which allows protocols to request that they always operate the deferred dispatch, meaning they can acquire Giant if they need to, and modified those two to do so. That should go away by 8.0 also. Robert N M Watson Computer Laboratory University of Cambridge