Date: Thu, 27 Oct 2011 14:43:58 -0600 From: Warner Losh <imp@bsdimp.com> To: Adrian Chadd <adrian@FreeBSD.org> Cc: freebsd-arch@FreeBSD.org Subject: Re: newbus IO ordering semantics - moving forward Message-ID: <E24309DA-09E3-40E1-A605-5CC72F03150A@bsdimp.com> In-Reply-To: <CAJ-VmonFJG3xLn2JvarOUN6o-e7MC%2BA%2B=W9_vocZqY6L3CmTmQ@mail.gmail.com> References: <CAJ-VmonFJG3xLn2JvarOUN6o-e7MC%2BA%2B=W9_vocZqY6L3CmTmQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Oct 27, 2011, at 2:28 PM, Adrian Chadd wrote:
> So what I'm proposing is:
>=20
> * Make the bus default to use ordered semantics, much like what Linux
> does - ie, all IO read/writes (io or memory) are in-order and flushed
> with a barrier;
> * Add an option which allows the driver to request a region with
> loose-running/lazy semantics, what we're supposed to have now, and
> then leave barriers up to the driver;
> * Print out something nice and loud if a driver decides to use the
> lazy/loose semantics, which may result in unpredictable behaviour on
> non-{i386,amd64}.
>=20
> I'd appreciate some feedback/comments before I go off and code all of =
this up.
Having an option to support lazy would be easy to code up on x86 where =
it isn't needed. However, on some architectures, the bus space routines =
are implemented as a series of function calls from a table that's passed =
around in the bus_space_t. Those architectures it would be hard to =
implement differing behavior like you propose.
Having it whine on lazy will ensure that lazy is never used since such a =
message will "scare the horses" and people will stamped to using the =
synchronous one.
One question: What's the slowdown from making everything synchronous?
Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E24309DA-09E3-40E1-A605-5CC72F03150A>
