OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b91ef18
)
io_uring: remove extra barrier for non-sqpoll iopoll
author
Pavel Begunkov
<asml.silence@gmail.com>
Thu, 17 Mar 2022 02:03:39 +0000
(
02:03
+0000)
committer
Jens Axboe
<axboe@kernel.dk>
Thu, 17 Mar 2022 02:26:32 +0000
(20:26 -0600)
smp_mb() in io_cqring_ev_posted_iopoll() is only there because of
waitqueue_active(). However, non-SQPOLL IOPOLL ring doesn't wake the CQ
and so the barrier there is useless. Kill it, it's usually pretty
expensive.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link:
https://lore.kernel.org/r/d72e8ef6f7a3f6a72e18fad8409f7d47afc8da7d.1647481208.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c
patch
|
blob
|
history
diff --git
a/fs/io_uring.c
b/fs/io_uring.c
index
f039706
..
692dbe7
100644
(file)
--- a/
fs/io_uring.c
+++ b/
fs/io_uring.c
@@
-1877,11
+1877,8
@@
static void io_cqring_ev_posted(struct io_ring_ctx *ctx)
static void io_cqring_ev_posted_iopoll(struct io_ring_ctx *ctx)
{
- /* see waitqueue_active() comment */
- smp_mb();
-
if (ctx->flags & IORING_SETUP_SQPOLL) {
- if (w
aitqueue_active
(&ctx->cq_wait))
+ if (w
q_has_sleeper
(&ctx->cq_wait))
wake_up_all(&ctx->cq_wait);
}
io_eventfd_signal(ctx);