From owner-svn-src-all@FreeBSD.ORG Tue Dec 16 18:28:59 2008 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BAC2A1065675; Tue, 16 Dec 2008 18:28:59 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 6F81F8FC14; Tue, 16 Dec 2008 18:28:59 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.local ([192.168.254.200]) (authenticated bits=0) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id mBGISpBm067214; Tue, 16 Dec 2008 11:28:52 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <4947F363.4010909@samsco.org> Date: Tue, 16 Dec 2008 11:28:51 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.13) Gecko/20080313 SeaMonkey/1.1.9 MIME-Version: 1.0 To: "M. Warner Losh" References: <200812161604.mBGG4fBd041647@svn.freebsd.org> <4947D474.9040802@samsco.org> <20081216.101038.1172765453.imp@bsdimp.com> In-Reply-To: <20081216.101038.1172765453.imp@bsdimp.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=3.8 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: svn-src-head@FreeBSD.org, mav@FreeBSD.org, src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r186182 - head/sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Dec 2008 18:28:59 -0000 M. Warner Losh wrote: > In message: <4947D474.9040802@samsco.org> > Scott Long writes: > : Alexander Motin wrote: > : > Author: mav > : > Date: Tue Dec 16 16:04:40 2008 > : > New Revision: 186182 > : > URL: http://svn.freebsd.org/changeset/base/186182 > : > > : > Log: > : > Call ata_legacy() only once on attach and save it's result. Scanning PCI > : > configuration registers (which are not going to change) on every interrupt > : > looks expensive, especially when interrupt is shared. Profiling shows me 3% > : > of time spent by atapci0 on pure network load due to IRQ sharing with em0. > : > > : > : Nice change. PCI Config registers are exceptionally slow to access on > : most systems. > > And we've been recommending to people for years that they avoid config > space access in interrupt handlers. Maybe it is time for something > that checks and prints a warning? > With the move to memory-mapped pci config registers, there was an intention to allow low-end devices to put their registers into config space. I think I recall some legacy ultra-low end devices that also put a few required registers into config space. So while it's not ideal to access it from an interrupt handler, I can't think of why it should be expressly forbidden. Scott