提交 31f0e246 编写于 作者: S Stefan Bühler 提交者: Joseph Qi

io_uring: remove unnecessary barrier after unsetting IORING_SQ_NEED_WAKEUP

commit 62977281a6384d3904c02272a638cc3ac3bac54d upstream.

There is no operation to order with afterwards, and removing the flag is
not critical in any way.

There will always be a "race condition" where the application will
trigger IORING_ENTER_SQ_WAKEUP when it isn't actually needed.
Signed-off-by: NStefan Bühler <source@stbuehler.de>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
Signed-off-by: NJoseph Qi <joseph.qi@linux.alibaba.com>
Reviewed-by: NJeffle Xu <jefflexu@linux.alibaba.com>
Acked-by: NCaspar Zhang <caspar@linux.alibaba.com>
上级 b3764e21
...@@ -1969,13 +1969,11 @@ static int io_sq_thread(void *data) ...@@ -1969,13 +1969,11 @@ static int io_sq_thread(void *data)
finish_wait(&ctx->sqo_wait, &wait); finish_wait(&ctx->sqo_wait, &wait);
ctx->sq_ring->flags &= ~IORING_SQ_NEED_WAKEUP; ctx->sq_ring->flags &= ~IORING_SQ_NEED_WAKEUP;
smp_wmb();
continue; continue;
} }
finish_wait(&ctx->sqo_wait, &wait); finish_wait(&ctx->sqo_wait, &wait);
ctx->sq_ring->flags &= ~IORING_SQ_NEED_WAKEUP; ctx->sq_ring->flags &= ~IORING_SQ_NEED_WAKEUP;
smp_wmb();
} }
i = 0; i = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册