mirror of
https://github.com/torvalds/linux.git
synced 2025-11-03 10:10:33 +02:00
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>
This commit is contained in:
parent
10b02a2cfe
commit
4e15fa8305
1 changed files with 4 additions and 5 deletions
|
|
@ -2809,13 +2809,12 @@ static __poll_t io_uring_poll(struct file *file, poll_table *wait)
|
||||||
|
|
||||||
if (unlikely(!ctx->poll_activated))
|
if (unlikely(!ctx->poll_activated))
|
||||||
io_activate_pollwq(ctx);
|
io_activate_pollwq(ctx);
|
||||||
|
|
||||||
poll_wait(file, &ctx->poll_wq, wait);
|
|
||||||
/*
|
/*
|
||||||
* synchronizes with barrier from wq_has_sleeper call in
|
* provides mb() which pairs with barrier from wq_has_sleeper
|
||||||
* io_commit_cqring
|
* call in io_commit_cqring
|
||||||
*/
|
*/
|
||||||
smp_rmb();
|
poll_wait(file, &ctx->poll_wq, wait);
|
||||||
|
|
||||||
if (!io_sqring_full(ctx))
|
if (!io_sqring_full(ctx))
|
||||||
mask |= EPOLLOUT | EPOLLWRNORM;
|
mask |= EPOLLOUT | EPOLLWRNORM;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue