engines/io_uring: relax CQ head atomic store ordering
authorCaleb Sander Mateos <csander@purestorage.com>
Thu, 17 Jul 2025 18:05:10 +0000 (12:05 -0600)
committerCaleb Sander Mateos <csander@purestorage.com>
Thu, 17 Jul 2025 18:05:10 +0000 (12:05 -0600)
commita9af54b024f15f8677c69a27df21f77abd76ec9b
treee812eee7bb933c77fb8bf98893b6be1e7238b40d
parent11b5e37c4bf7475e6c15b43aa657bbdaae5bb593
engines/io_uring: relax CQ head atomic store ordering

fio_ioring_getevents() advances the io_uring CQ head index in
fio_ioring_cqring_reap() before fio_ioring_event() is called to read the
CQEs. In general this would allow the kernel to reuse the CQE slot
prematurely, but the CQ is sized large enough for the maximum iodepth
and a new io_uring operation isn't submitted until the CQE is processed.
Add a comment to explain why it's safe to advance the CQ head index
early. Use relaxed ordering for the store, as there aren't any accesses
to the CQEs that need to be ordered before the store.

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
engines/io_uring.c