Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

io_uring_poll: kill the no longer necessary barrier after poll_wait()

Now that poll_wait() provides a full barrier we can remove smp_rmb() from
io_uring_poll().

In fact I don't think smp_rmb() was correct, it can't serialize LOADs and
STOREs.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Link: https://lore.kernel.org/r/20250107162730.GA18940@redhat.com
Signed-off-by: Christian Brauner <brauner@kernel.org>

authored by

Oleg Nesterov and committed by
Christian Brauner
4e15fa83 10b02a2c

+4 -5
+4 -5
io_uring/io_uring.c
··· 2809 2809 2810 2810 if (unlikely(!ctx->poll_activated)) 2811 2811 io_activate_pollwq(ctx); 2812 - 2813 - poll_wait(file, &ctx->poll_wq, wait); 2814 2812 /* 2815 - * synchronizes with barrier from wq_has_sleeper call in 2816 - * io_commit_cqring 2813 + * provides mb() which pairs with barrier from wq_has_sleeper 2814 + * call in io_commit_cqring 2817 2815 */ 2818 - smp_rmb(); 2816 + poll_wait(file, &ctx->poll_wq, wait); 2817 + 2819 2818 if (!io_sqring_full(ctx)) 2820 2819 mask |= EPOLLOUT | EPOLLWRNORM; 2821 2820