From owner-cvs-all Wed Feb 19 14:15:43 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F2A3837B405; Wed, 19 Feb 2003 14:15:40 -0800 (PST) Received: from magic.adaptec.com (magic.adaptec.com [208.236.45.80]) by mx1.FreeBSD.org (Postfix) with ESMTP id C41C443FA3; Wed, 19 Feb 2003 14:15:39 -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 h1JMFbD22064; Wed, 19 Feb 2003 14:15:37 -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 OAA17067; Wed, 19 Feb 2003 14:15:27 -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 PAA07304; Wed, 19 Feb 2003 15:15:23 -0700 (MST) Message-ID: <3E540158.20504@btc.adaptec.com> Date: Wed, 19 Feb 2003 15:12:40 -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: 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> In-Reply-To: <200302192158.h1JLwYJn025529@repoman.freebsd.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-cvs-all@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: > 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. > > Mike "Silby" Silbersack > > > On Wed, 19 Feb 2003, Scott Long wrote: > > > >scottl 2003/02/19 13:58:34 PST > > > > Modified files: > > sys/dev/aac aac.c aac_pci.c > > Log: > > Make the aac driver be INTR_MPSAFE. Once the interrupt handler > determines > > that a command completion happened, all further processing is > deferred to > > a taskqueue. The taskqueue itself runs implicetely under Giant, but we > > already used a taskqueue for the biodone() processing, so this at least > > saves the contesting of Giant in the interrupt handler. > > > > Revision Changes Path > > 1.54 +12 -36 src/sys/dev/aac/aac.c > > 1.29 +3 -2 src/sys/dev/aac/aac_pci.c > > I've tested via assertions that the rest of the driver is under Giant. All this change really did was move some processing out of the interrupt path and into the already-existing taskqueue. The two pieces of the driver that need to be atomic are the handling of the hardware registers and the handling of the various queues. The former is pretty easy to identify via visual inspection, and the latter has an extensive amount of sanity checking and debugging built into it. Scott To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message