newbus IO ordering semantics - moving forward
Warner Losh
imp at bsdimp.com
Fri Oct 28 16:10:52 UTC 2011
On Oct 28, 2011, at 1:15 AM, Hans Petter Selasky wrote:
> On Thursday 27 October 2011 22:28:13 Adrian Chadd wrote:
>> * 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;
>
> I think this is the assumption of many USB controller drivers currently in the
> tree.
The ordering guarantees aren't as random as Adrian suggests. All writes are posted before any reads is about all you can count on. Most drivers naturally cope with this well. All reads have to be synchronous by their very nature and in-order. There's more liberty taken with writes wrt ordering.
Where it falls down is DMA or MSI. Both of those have writes from the device to the system memory, and ordering of the completion of those relative to other things isn't completely guaranteed.
Warner
More information about the freebsd-arch
mailing list