io_uring: fix notes on barriers
authorStefan Bühler <source@stbuehler.de>
Wed, 24 Apr 2019 21:54:16 +0000 (23:54 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 30 Apr 2019 15:40:02 +0000 (09:40 -0600)
commit1e84b97b7377bd0198f87b49ad3e396e84bf0458
tree8db2e33c5aabfc341a9b1b5a6d17297747ba67f0
parent8449eedaa1da6a51d67190c905b1b54243e095f6
io_uring: fix notes on barriers

The application reading the CQ ring needs a barrier to pair with the
smp_store_release in io_commit_cqring, not the barrier after it.

Also a write barrier *after* writing something (but not *before*
writing anything interesting) doesn't order anything, so an smp_wmb()
after writing SQ tail is not needed.

Additionally consider reading SQ head and writing CQ tail in the notes.

Also add some clarifications how the various other fields in the ring
buffers are used.

Signed-off-by: Stefan Bühler <source@stbuehler.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c