engines/io_uring: use the atomic load acquire instead of a barrier
[fio.git] / engines / io_uring.c
index 44b3c533e288e7e8c3a5bf91f59bbc1b19818c44..ca5b90c91be78b3d8964dc87c130d41ccdc6de24 100644 (file)
@@ -446,9 +446,10 @@ static int fio_ioring_commit(struct thread_data *td)
         */
        if (o->sqpoll_thread) {
                struct io_sq_ring *ring = &ld->sq_ring;
+               unsigned flags;
 
-               read_barrier();
-               if (*ring->flags & IORING_SQ_NEED_WAKEUP)
+               flags = atomic_load_acquire(ring->flags);
+               if (flags & IORING_SQ_NEED_WAKEUP)
                        io_uring_enter(ld, ld->queued, 0,
                                        IORING_ENTER_SQ_WAKEUP);
                ld->queued = 0;