Re: LKMM: Read dependencies of writes ordered by dma_wmb()?

From
Marco Elver <elver@google.com>
Date
2021-08-17 13:27:41
Reply to
Will Deacon, 2021-08-17
On Tue, 17 Aug 2021 at 14:28, Will Deacon [off-list ref] wrote:
Just on this bit...

On Mon, Aug 16, 2021 at 01:50:57PM -0700, Paul E. McKenney wrote:
quoted
5.    The dma_mb(), dma_rmb(), and dma_wmb() appear to be specific
      to ARMv8.
These are useful on other architectures too! IIRC, they were added by x86 in
the first place. They're designed to be used with dma_alloc_coherent()
allocations where you're sharing something like a ring buffer with a device
and they guarantee accesses won't be reordered before they become visible
to the device. They _also_ provide the same ordering to other CPUs.
Ah, good you pointed it out again. Re-reading memory-barriers.txt and
it does also say these provide order for other CPUs...
I gave a talk at LPC about some of this, which might help (or might make
things worse...):

https://www.youtube.com/watch?v=i6DayghhA8Q
Nice, thank you!
Ignore the bits about mmiowb() as we got rid of that.

Will
Thread (11 messages) 11 messages, 4 authors, last reply 2021-08-18
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help