From owner-cvs-src Wed Feb 19 16:33:30 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 445F437B401; Wed, 19 Feb 2003 16:33:27 -0800 (PST) Received: from magic.adaptec.com (magic.adaptec.com [208.236.45.80]) by mx1.FreeBSD.org (Postfix) with ESMTP id 08E1143FA3; Wed, 19 Feb 2003 16:33:26 -0800 (PST) (envelope-from scott_long@btc.adaptec.com) Received: from redfish.adaptec.com (redfish.adaptec.com [162.62.50.11]) by magic.adaptec.com (8.11.6+Sun/8.11.6) with ESMTP id h1K0XID18768; Wed, 19 Feb 2003 16:33:18 -0800 (PST) Received: from btc.btc.adaptec.com (btc.btc.adaptec.com [10.100.0.52]) by redfish.adaptec.com (8.8.8+Sun/8.8.8) with ESMTP id QAA18039; Wed, 19 Feb 2003 16:33:07 -0800 (PST) Received: from btc.adaptec.com (hollin [10.100.253.56]) by btc.btc.adaptec.com (8.8.8+Sun/8.8.8) with ESMTP id RAA07367; Wed, 19 Feb 2003 17:33:04 -0700 (MST) Message-ID: <3E54219C.9030103@btc.adaptec.com> Date: Wed, 19 Feb 2003 17:30:20 -0700 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.2b) Gecko/20021216 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mike Silbersack Cc: Andrew Gallatin , 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 References: <200302192158.h1JLwYJn025529@repoman.freebsd.org> <20030219161458.T62705@patrocles.silby.com> <20030219181629.A46948@grasshopper.cs.duke.edu> <20030219182122.N62705@patrocles.silby.com> In-Reply-To: <200302192158.h1JLwYJn025529@repoman.freebsd.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 wrote: > On Wed, 19 Feb 2003, Andrew Gallatin wrote: > > > >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 > > > Ugh, miibus, I had forgotten about that... well, I guess it'll take a bit > of work to doublecheck everything. The busdma routines are already > MPSAFE, aren't they? I haven't checked, but I'd assume so, given how new > they are. :) busdma has been around since 3.0. It probably needs a couple of hours of work to lock it down. > > I tried looking back to find the original message where you talked about > the performance boost, but I can't find it now. Refresh my memory; was > the speedup present on UP systems as well? I don't have any SMP boxes > here, so I'm curious as to what extent I'd be able to benchmark a > difference. I've seen performance gains as high as 20%. Presumably this is because you eliminate the two extra context switches that result from blocking on Giant. I doubt that you'll see much gain in a UP system, but I haven't benchmarked it. Once Peter commits his lazy context switching patches, this gain won't be as dramatic anymore. Scott To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-src" in the body of the message