diff mbox series

[barrier,cleanup,v1,7/7] io_uring: remove unnecessary barrier after unsetting IORING_SQ_NEED_WAKEUP

Message ID 20190424215422.7404-7-source@stbuehler.de (mailing list archive)
State Accepted, archived
Headers show
Series [barrier,cleanup,v1,1/7] io_uring: fix notes on barriers | expand

Commit Message

Stefan Bühler April 24, 2019, 9:54 p.m. UTC
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: Stefan Bühler <source@stbuehler.de>
---
 fs/io_uring.c | 2 --
 1 file changed, 2 deletions(-)
diff mbox series

Patch

diff --git a/fs/io_uring.c b/fs/io_uring.c
index 0287f6694e3b..da084bcbd408 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -1966,13 +1966,11 @@  static int io_sq_thread(void *data)
 				finish_wait(&ctx->sqo_wait, &wait);
 
 				ctx->sq_ring->flags &= ~IORING_SQ_NEED_WAKEUP;
-				smp_wmb();
 				continue;
 			}
 			finish_wait(&ctx->sqo_wait, &wait);
 
 			ctx->sq_ring->flags &= ~IORING_SQ_NEED_WAKEUP;
-			smp_wmb();
 		}
 
 		i = 0;