From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 00:38:26 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 958A31065673; Sat, 27 Dec 2008 00:38:26 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 6D9D98FC12; Sat, 27 Dec 2008 00:38:26 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 60C581A3C3A; Fri, 26 Dec 2008 16:38:26 -0800 (PST) Date: Fri, 26 Dec 2008 16:38:26 -0800 From: Alfred Perlstein To: "M. Warner Losh" Message-ID: <20081227003826.GV18389@elvis.mu.org> References: <4947D474.9040802@samsco.org> <20081216.101038.1172765453.imp@bsdimp.com> <4947F363.4010909@samsco.org> <20081216.120412.1346820326.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081216.120412.1346820326.imp@bsdimp.com> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, scottl@samsco.org, src-committers@FreeBSD.org, mav@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: Sat, 27 Dec 2008 00:38:26 -0000 * M. Warner Losh [081216 11:06] wrote: > In message: <4947F363.4010909@samsco.org> > Scott Long writes: > : 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. > > True. I wasn't planning on banning it, just warning about it so we > could be purposeful in our use of it. Likely unworkable though... Easy enough to stash a "once" varible in the generic device struct and warn when returning from an isr when INVARIANTS or something is turned on. Then you'd only get one warning per device once it happens. -- - Alfred Perlstein