summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/io_uring.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2020-02-14 22:23:12 -0700
committerJens Axboe <axboe@kernel.dk>2020-03-02 14:06:38 -0700
commitd7718a9d25a61442da8ee8aeeff6a0097f0ccfd6 (patch)
tree5a88525b8c6c5b2cc76d84e472a06f9317d39c5f /include/uapi/linux/io_uring.h
parent8a72758c51f8a5501a0e01ea95069630edb9ca07 (diff)
downloadlinux-d7718a9d25a61442da8ee8aeeff6a0097f0ccfd6.tar.gz
linux-d7718a9d25a61442da8ee8aeeff6a0097f0ccfd6.tar.bz2
linux-d7718a9d25a61442da8ee8aeeff6a0097f0ccfd6.zip
io_uring: use poll driven retry for files that support it
Currently io_uring tries any request in a non-blocking manner, if it can, and then retries from a worker thread if we get -EAGAIN. Now that we have a new and fancy poll based retry backend, use that to retry requests if the file supports it. This means that, for example, an IORING_OP_RECVMSG on a socket no longer requires an async thread to complete the IO. If we get -EAGAIN reading from the socket in a non-blocking manner, we arm a poll handler for notification on when the socket becomes readable. When it does, the pending read is executed directly by the task again, through the io_uring task work handlers. Not only is this faster and more efficient, it also means we're not generating potentially tons of async threads that just sit and block, waiting for the IO to complete. The feature is marked with IORING_FEAT_FAST_POLL, meaning that async pollable IO is fast, and that poll<link>other_op is fast as well. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/uapi/linux/io_uring.h')
-rw-r--r--include/uapi/linux/io_uring.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h
index 08891cc1c1e7..53b36311cdac 100644
--- a/include/uapi/linux/io_uring.h
+++ b/include/uapi/linux/io_uring.h
@@ -216,6 +216,7 @@ struct io_uring_params {
#define IORING_FEAT_SUBMIT_STABLE (1U << 2)
#define IORING_FEAT_RW_CUR_POS (1U << 3)
#define IORING_FEAT_CUR_PERSONALITY (1U << 4)
+#define IORING_FEAT_FAST_POLL (1U << 5)
/*
* io_uring_register(2) opcodes and arguments