From owner-freebsd-current@FreeBSD.ORG Thu Oct 30 07:59:49 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4104516A4CE for ; Thu, 30 Oct 2003 07:59:49 -0800 (PST) Received: from ebb.errno.com (ebb.errno.com [66.127.85.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F85843FA3 for ; Thu, 30 Oct 2003 07:59:48 -0800 (PST) (envelope-from sam@errno.com) Received: from 66.127.85.91 ([66.127.85.91]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.9) with ESMTP id h9UFxh0x046549 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Thu, 30 Oct 2003 07:59:47 -0800 (PST) (envelope-from sam@errno.com) From: Sam Leffler Organization: Errno Consulting To: Pawel Jakub Dawidek Date: Thu, 30 Oct 2003 08:01:23 -0800 User-Agent: KMail/1.5.3 References: <200310291052.48617.sam@errno.com> <20031030092238.GY84474@garage.freebsd.pl> In-Reply-To: <20031030092238.GY84474@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200310300801.23878.sam@errno.com> cc: freebsd-current@freebsd.org Subject: Re: HEADSUP: MPSAFE network drivers X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2003 15:59:49 -0000 On Thursday 30 October 2003 01:22 am, Pawel Jakub Dawidek wrote: > On Wed, Oct 29, 2003 at 11:52:48AM -0700, Sam Leffler wrote: > +> I'm committing changes to mark various network drivers' interrupt > handlers +> MPSAFE. To insure folks have a way to backout if they hit > problems I've also +> added a tunable that lets you disable this w/o > rebuilding your kernel. By +> default all network drivers that register an > interrupt handler INTR_MPSAFE +> are setup to run their ISR w/o Giant. If > you want to defeat this w/o +> changing the code you can set > +> > +> debug.mpsafenet=0 > +> > +> from the loader when booting and the MPSAFE bit will automatically be > removed. +> I plan to use this to also control forthcoming changes for > registering MPSAFE +> netisrs. > +> > +> The following drivers are marked MPSAFE: > +> > +> ath, em, ep, fxp, sn, wi, sis > +> > +> I've got changes coming for bge. Other drivers probably can be marked > MPSAFE +> but I'm only doing it for those drivers that I can test. > > Because there is so many drivers, maybe you could prepare some regression > tests designed to check changed things. This will allow people to test your > changes - it is not very easy now if we don't know what we're looking for > exactly PLUS those drivers aren't marked MPSAFE by default. Unfortunately there is no easy way to decide if the locking in a driver is correct; otherwise I'd simply test them and not provide a fallback as a I did. Before I commit any driver I run with it for at least a few weeks (in some cases months) on a variety of machines (workstation, server, laptop, firewall). If there are no problems then I commit the change. The driver changes I committed yesterday I've been running for >4 months. Likewise, the next round of locking changes to push Giant up have been running for ~2 months. Otherwise the main safeguard I use are numerous assertions to validate assumptions. Sam