From owner-cvs-src Wed Feb 19 15:16:39 2003 Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8142C37B401; Wed, 19 Feb 2003 15:16:37 -0800 (PST) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8825F43F93; Wed, 19 Feb 2003 15:16:36 -0800 (PST) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.12.6/8.12.6) with ESMTP id h1JNGZ8I028083 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 19 Feb 2003 18:16:35 -0500 (EST) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.11.6/8.9.1) id h1JNGUo46974; Wed, 19 Feb 2003 18:16:30 -0500 (EST) (envelope-from gallatin@cs.duke.edu) Date: Wed, 19 Feb 2003 18:16:30 -0500 From: Andrew Gallatin To: Mike Silbersack Cc: Scott Long , src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/aac aac.c aac_pci.c Message-ID: <20030219181629.A46948@grasshopper.cs.duke.edu> References: <200302192158.h1JLwYJn025529@repoman.freebsd.org> <20030219161458.T62705@patrocles.silby.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20030219161458.T62705@patrocles.silby.com>; from silby@silby.com on Wed, Feb 19, 2003 at 04:16:18PM -0600 X-Operating-System: FreeBSD 4.4-RELEASE on an i386 Sender: owner-cvs-src@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Mike Silbersack [silby@silby.com] wrote: > > Out of curiosity, how are you testing MPSAFEness other than by visual > inspection? I've been pondering making if_vr and if_xl MPSAFE, but I > really have no clue how to verify that I've done the job correctly. What I did when I made my out-of-tree Myrinet driver MPSAFE was to basically make my own big dumb lock. Except that the lock is per-softc, rather than for the whole kernel. Eg, I enter my transmit routine and acquire my dumb lock, releasing it when I leave. Similarly for the interrupt routine. My driver is simple, and uses neither miibus nor busdma, which may be possible places where you could get into trouble. I've beaten the snot out of it, and seen no LOR's and no deadlocks, and a huge performance boost -- back to nearly 80% of 4.x for some netperf workloads from 60% or so (sorry for the vague generalizations). I should probably get the lock in my ioctl routine, but I haven't bothered so far. I'd love to see you make if_xl MPSAFE. Drew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-src" in the body of the message