From owner-freebsd-arch@FreeBSD.ORG Fri Oct 28 16:09:15 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 6BB7B106566C; Fri, 28 Oct 2011 16:09:15 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 26F508FC14; Fri, 28 Oct 2011 16:09:15 +0000 (UTC) Received: from [10.30.101.53] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p9SG7Aeh036981 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Fri, 28 Oct 2011 10:08:08 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Fri, 28 Oct 2011 10:07:47 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <34E9F112-930C-4836-9949-FA8A01763969@bsdimp.com> References: <20111028073710.GP25601@funkthat.com> To: Adrian Chadd X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Fri, 28 Oct 2011 10:08:08 -0600 (MDT) 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 16:09:15 -0000 On Oct 28, 2011, at 7:07 AM, Adrian Chadd wrote: > 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. >>=20 >> 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... >=20 > 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. >=20 > 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. :) I would have thought that multiple reads to the same location to an = uncached location wouldn't be a problem. Perhaps you can share how that = didn't work. Warner