io_uring: we should not need two write barriers for SQ updates
authorJens Axboe <axboe@kernel.dk>
Thu, 27 Feb 2020 02:54:12 +0000 (19:54 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 27 Feb 2020 02:54:12 +0000 (19:54 -0700)
Just after updating the tail should be fine.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
engines/io_uring.c
t/io_uring.c

index 5e59f975c3c529ab735961763c49270ec63eb111..1efc6cffc6f821f2f8c3f61151976e755e083bdb 100644 (file)
@@ -374,8 +374,6 @@ static enum fio_q_status fio_ioring_queue(struct thread_data *td,
        if (next_tail == *ring->head)
                return FIO_Q_BUSY;
 
-       /* ensure sqe stores are ordered with tail update */
-       write_barrier();
        if (o->cmdprio_percentage)
                fio_ioring_prio_prep(td, io_u);
        ring->array[tail & ld->sq_ring_mask] = io_u->index;
index 55b75f6ed9664858a7cc6155ce0c159a146a4479..e84a2b6b9a1c584bc9b4277f30b64d6d182f7954 100644 (file)
@@ -216,8 +216,6 @@ static int prep_more_ios(struct submitter *s, int max_ios)
        } while (prepped < max_ios);
 
        if (*ring->tail != tail) {
-               /* order tail store with writes to sqes above */
-               write_barrier();
                *ring->tail = tail;
                write_barrier();
        }