io_uring: flag SQPOLL busy condition to userspace
authorJens Axboe <axboe@kernel.dk>
Sun, 10 Nov 2019 23:56:04 +0000 (16:56 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 11 Nov 2019 23:33:11 +0000 (16:33 -0700)
commitc1edbf5f081be9fbbea68c1d564b773e59c1acf3
treea15d9e413c84f4793b77f18b18dbef4c2b211087
parent47f467686ec02fc07fd5c6bb34b6f6736e2884b0
io_uring: flag SQPOLL busy condition to userspace

Now that we have backpressure, for SQPOLL, we have one more condition
that warrants flagging that the application needs to enter the kernel:
we failed to submit IO due to backpressure. Make sure we catch that
and flag it appropriately.

If we run into backpressure issues with the SQPOLL thread, flag it
as such to the application by setting IORING_SQ_NEED_WAKEUP. This will
cause the application to enter the kernel, and that will flush the
backlog and clear the condition.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c