io_uring: remove unnecessary barrier before reading SQ tail [Linux 5.1]

io_uring: remove unnecessary barrier before reading SQ tail [Linux 5.1]

This Linux kernel change "io_uring: remove unnecessary barrier before reading SQ tail" is included in the Linux 5.1 release. This change is authored by Stefan Bühler <source [at] stbuehler.de> on Wed Apr 24 23:54:20 2019 +0200. The commit for this change in Linux stable tree is 82ab082 (patch).

io_uring: remove unnecessary barrier before reading SQ tail

There is no operation before to order with.

Signed-off-by: Stefan Bühler <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>

There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 fs/io_uring.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/io_uring.c b/fs/io_uring.c
index d3c57ee..662f1c0 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -1831,8 +1831,6 @@ static bool io_get_sqring(struct io_ring_ctx *ctx, struct sqe_submit *s)
     *    though the application is the one updating it.
     */
    head = ctx->cached_sq_head;
-   /* See comment at the top of this file */
-   smp_rmb();
    /* make sure SQ entry isn't read before tail */
    if (head == smp_load_acquire(&ring->r.tail))
        return false;

Leave a Reply

Your email address will not be published. Required fields are marked *