From: Jens Axboe Date: Fri, 11 Jan 2019 21:40:16 +0000 (-0700) Subject: t/io_uring: only set IORING_ENTER_GETEVENTS when actively reaping X-Git-Tag: fio-3.13~30 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=e0abe38815e1c8cf7a319c6fbd0b1d60691db3d5;p=fio.git t/io_uring: only set IORING_ENTER_GETEVENTS when actively reaping Don't set it if we don't need to find an event (to_wait == 0). Signed-off-by: Jens Axboe --- diff --git a/t/io_uring.c b/t/io_uring.c index 595e6f20..d4160c3d 100644 --- a/t/io_uring.c +++ b/t/io_uring.c @@ -300,8 +300,11 @@ submit: * poll, or if IORING_SQ_NEED_WAKEUP is set. */ if (!sq_thread_poll || (*ring->flags & IORING_SQ_NEED_WAKEUP)) { - ret = io_uring_enter(s, to_submit, to_wait, - IORING_ENTER_GETEVENTS); + unsigned flags = 0; + + if (to_wait) + flags = IORING_ENTER_GETEVENTS; + ret = io_uring_enter(s, to_submit, to_wait, flags); s->calls++; }