On 8/16/24 12:01 PM, David Wei wrote: > @@ -2414,6 +2414,8 @@ static int io_cqring_wait(struct io_ring_ctx *ctx, int min_events, u32 flags, > iowq.nr_timeouts = atomic_read(&ctx->cq_timeouts); > iowq.cq_tail = READ_ONCE(ctx->rings->cq.head) + min_events; > iowq.timeout = KTIME_MAX; > + if (flags & IORING_ENTER_NO_IOWAIT) > + iowq.no_iowait = true; Oh, and this should be: iowq.no_iowait = flags & IORING_ENTER_NO_IOWAIT; to avoid leaving this field uninitialized by default if the flag isn't set. The struct isn't initialized to zero. -- Jens Axboe