From owner-freebsd-arch@FreeBSD.ORG Fri Oct 28 17:48:41 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E83A2106566B; Fri, 28 Oct 2011 17:48:41 +0000 (UTC) (envelope-from jmg@h2.funkthat.com) Received: from h2.funkthat.com (gate.funkthat.com [70.36.235.232]) by mx1.freebsd.org (Postfix) with ESMTP id A97A48FC0C; Fri, 28 Oct 2011 17:48:41 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id p9SHmfG9004397 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 28 Oct 2011 10:48:41 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id p9SHmf8J004396; Fri, 28 Oct 2011 10:48:41 -0700 (PDT) (envelope-from jmg) Date: Fri, 28 Oct 2011 10:48:41 -0700 From: John-Mark Gurney To: Adrian Chadd Message-ID: <20111028174840.GQ25601@funkthat.com> Mail-Followup-To: Adrian Chadd , freebsd-arch@freebsd.org References: <20111028073710.GP25601@funkthat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Fri, 28 Oct 2011 10:48:41 -0700 (PDT) Cc: freebsd-arch@freebsd.org Subject: Re: newbus IO ordering semantics - moving forward X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Oct 2011 17:48:42 -0000 Adrian Chadd wrote this message on Fri, Oct 28, 2011 at 21:07 +0800: > On 28 October 2011 15:37, John-Mark Gurney wrote: > >> I'd appreciate some feedback/comments before I go off and code all of this up. > > > > I think we should complain about the drivers that are NOT using the > > lazy/loose semantics as those are the drivers that are slower than > > they should be, and/or not written properly.  Complaining about properly > > written drivers that use the lazy/loose semantics when they get updated > > to be correct is wrong... > > Right. My point though is that I'm not sure of how many drivers have > been tested outside of i386/amd64. Marcus's response is helpful, > indicating that the sparc64 guys have tested a lot of this. Yes, the > barrier calls are expensive and yes, drivers on i386/amd64 still need > to do bus_dmamap_sync() calls. > > I can only speak from my limited experience here after tracking down > that ath/ath_hal bug. My experience is that ath(4) triggered on PPC > because of a loop which read the same register a few times. I recall > seeing an ethernet driver recently have a commit which also did this. > I'm happy to do the reverse. Ie, on platforms where it matters, add a > warning printf (in verbose boot) when drivers aren't indicating > they've been fully tested. Or, I'm happy to completely ignore the > situation. :) How about when we have debugging turned on (i.e. -current) we warn on all platforms for drivers that aren't "correct", and then on -releases we only warn on platforms that it maters on? That gives developers encouragement to fix their bugs, but also lets users on these alternate platforms know that if something isn't working, it's possibly a driver bug... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."