From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 02:45:54 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 428E3106564A; Sat, 27 Dec 2008 02:45:54 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 609A98FC18; Sat, 27 Dec 2008 02:45:53 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by an-out-0708.google.com with SMTP id c2so1554138anc.13 for ; Fri, 26 Dec 2008 18:45:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:references:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:x-mailer :mime-version:subject:date:cc; bh=ff6Z8+E4n/pd8jn3OOWr5mPZplCkR3BKg+YL6mHqcLc=; b=QbEbTk28vkH0+y2MtACLKVf7CVrPMdbo3v12DCsjsvgHrwUalxArKWgdX+1UYICm9u IIXhofbzJl+I0z7aUdhZApz12MeTIPFrMispv2Gp2pvWKMuchVIKVvM1EU9hOWiZuEPS AZjRKYtzVZz5336PTG/MMvVKzPFLCMANdnf8o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=references:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:x-mailer:mime-version:subject:date:cc; b=DzeqN5YVMx9XVvWy7ErYpUKaL7h0qjvByVDnYvRjhJKNGaZGjyj7YXS1hBcjNVVW7D /GMp/R+r0fW9alhm3+iRuSVnpkC2hxd6y8InVDo/fL7Lc+LVbsPIpHMZHDePzAgbRtFa qIvnDVJqFgtZjhTgdEwJ/cwNp4UOJj+TbIEsg= Received: by 10.100.168.18 with SMTP id q18mr6634154ane.7.1230345952733; Fri, 26 Dec 2008 18:45:52 -0800 (PST) Received: from ?10.87.218.31? ([32.155.74.116]) by mx.google.com with ESMTPS id b14sm17619657ana.32.2008.12.26.18.45.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 26 Dec 2008 18:45:51 -0800 (PST) References: <4947D474.9040802@samsco.org> <20081216.101038.1172765453.imp@bsdimp.com> <4947F363.4010909@samsco.org> <20081216.120412.1346820326.imp@bsdimp.com> <20081227003826.GV18389@elvis.mu.org> <72A0CF67-F521-4C4B-955D-A80A77CC1165@samsco.org> Message-Id: <0775EC1A-7920-4B2A-A00E-1A930953B597@gmail.com> From: Garrett Cooper To: Scott Long In-Reply-To: <72A0CF67-F521-4C4B-955D-A80A77CC1165@samsco.org> Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Mailer: iPhone Mail (5F136) Mime-Version: 1.0 (iPhone Mail 5F136) Date: Fri, 26 Dec 2008 18:45:29 -0800 Cc: "src-committers@freebsd.org" , "mav@freebsd.org" , Alfred Perlstein , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "M. Warner Losh" Subject: Re: svn commit: r186182 - head/sys/dev/ata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 02:45:54 -0000 On Dec 26, 2008, at 18:33, Scott Long wrote: > > On Dec 26, 2008, at 5:38 PM, Alfred Perlstein > wrote: > >> * 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. >> >> > > I prefer to do nothing. It's not unsafe or erroneous to access cfg > registers. But if some kind of message does get added, I insist > that it drop all pretenses and say, "you're too poor to run freebsd, > come back when you can afford better hardware.". :) > > Scott Unfortunately embedded systems can't win the lottery ;.). -Garrett