aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/io_uring.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-08-27 17:11:06 -0600
committerJens Axboe <axboe@kernel.dk>2021-08-29 07:57:23 -0600
commit50c1df2b56e0f581b1dbf334dbf807d6fb8f77b2 (patch)
tree66e2f1d3944cd9635942741a559d2c0deb049c69 /include/uapi/linux/io_uring.h
parentio-wq: provide a way to limit max number of workers (diff)
downloadlinux-dev-50c1df2b56e0f581b1dbf334dbf807d6fb8f77b2.tar.xz
linux-dev-50c1df2b56e0f581b1dbf334dbf807d6fb8f77b2.zip
io_uring: support CLOCK_BOOTTIME/REALTIME for timeouts
Certain use cases want to use CLOCK_BOOTTIME or CLOCK_REALTIME rather than CLOCK_MONOTONIC, instead of the default CLOCK_MONOTONIC. Add an IORING_TIMEOUT_BOOTTIME and IORING_TIMEOUT_REALTIME flag that allows timeouts and linked timeouts to use the selected clock source. Only one clock source may be selected, and we -EINVAL the request if more than one is given. If neither BOOTIME nor REALTIME are selected, the previous default of MONOTONIC is used. Link: https://github.com/axboe/liburing/issues/369 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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h
index 64fe809c4e36..b6d28d927a3f 100644
--- a/include/uapi/linux/io_uring.h
+++ b/include/uapi/linux/io_uring.h
@@ -151,6 +151,9 @@ enum {
*/
#define IORING_TIMEOUT_ABS (1U << 0)
#define IORING_TIMEOUT_UPDATE (1U << 1)
+#define IORING_TIMEOUT_BOOTTIME (1U << 2)
+#define IORING_TIMEOUT_REALTIME (1U << 3)
+#define IORING_TIMEOUT_CLOCK_MASK (IORING_TIMEOUT_BOOTTIME | IORING_TIMEOUT_REALTIME)
/*
* sqe->splice_flags