newbus IO ordering semantics - moving forward

Warner Losh imp at bsdimp.com
Thu Oct 27 20:45:41 UTC 2011




On Oct 27, 2011, at 2:28 PM, Adrian Chadd wrote:
> So what I'm proposing is:
> 
> * 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}.
> 
> 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



More information about the freebsd-arch mailing list