Lines Matching refs:iowq
2320 static inline bool io_should_wake(struct io_wait_queue *iowq) in io_should_wake() argument
2322 struct io_ring_ctx *ctx = iowq->ctx; in io_should_wake()
2323 int dist = READ_ONCE(ctx->rings->cq.tail) - (int) iowq->cq_tail; in io_should_wake()
2330 return dist >= 0 || atomic_read(&ctx->cq_timeouts) != iowq->nr_timeouts; in io_should_wake()
2336 struct io_wait_queue *iowq = container_of(curr, struct io_wait_queue, in io_wake_function() local
2338 struct io_ring_ctx *ctx = iowq->ctx; in io_wake_function()
2344 if (io_should_wake(iowq) || io_has_work(ctx)) in io_wake_function()
2360 struct io_wait_queue *iowq, in io_cqring_wait_schedule() argument
2368 if (ret || io_should_wake(iowq)) in io_cqring_wait_schedule()
2392 struct io_wait_queue iowq; in io_cqring_wait() local
2433 init_waitqueue_func_entry(&iowq.wq, io_wake_function); in io_cqring_wait()
2434 iowq.wq.private = current; in io_cqring_wait()
2435 INIT_LIST_HEAD(&iowq.wq.entry); in io_cqring_wait()
2436 iowq.ctx = ctx; in io_cqring_wait()
2437 iowq.nr_timeouts = atomic_read(&ctx->cq_timeouts); in io_cqring_wait()
2438 iowq.cq_tail = READ_ONCE(ctx->rings->cq.head) + min_events; in io_cqring_wait()
2447 prepare_to_wait_exclusive(&ctx->cq_wait, &iowq.wq, in io_cqring_wait()
2449 ret = io_cqring_wait_schedule(ctx, &iowq, timeout); in io_cqring_wait()
2453 finish_wait(&ctx->cq_wait, &iowq.wq); in io_cqring_wait()