diff options
author | Jens Axboe <axboe@kernel.dk> | 2019-12-28 15:39:54 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-01-20 17:04:02 -0700 |
commit | 8110c1a6212e430a84edd2b83fe9043def8b743e (patch) | |
tree | 3b7df2807aebe7cec855965c2a077898651e81cf /include/uapi/linux/io_uring.h | |
parent | c6ca97b30c47c7ad36107d3764bb4dc37026d171 (diff) | |
download | linux-stable-8110c1a6212e430a84edd2b83fe9043def8b743e.tar.gz linux-stable-8110c1a6212e430a84edd2b83fe9043def8b743e.tar.bz2 linux-stable-8110c1a6212e430a84edd2b83fe9043def8b743e.zip |
io_uring: add support for IORING_SETUP_CLAMP
Some applications like to start small in terms of ring size, and then
ramp up as needed. This is a bit tricky to do currently, since we don't
advertise the max ring size.
This adds IORING_SETUP_CLAMP. If set, and the values for SQ or CQ ring
size exceed what we support, then clamp them at the max values instead
of returning -EINVAL. Since we return the chosen ring sizes after setup,
no further changes are needed on the application side. io_uring already
changes the ring sizes if the application doesn't ask for power-of-two
sizes, for example.
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.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h index 8ad3cece5440..29fae13395a8 100644 --- a/include/uapi/linux/io_uring.h +++ b/include/uapi/linux/io_uring.h @@ -61,6 +61,7 @@ struct io_uring_sqe { #define IORING_SETUP_SQPOLL (1U << 1) /* SQ poll thread */ #define IORING_SETUP_SQ_AFF (1U << 2) /* sq_thread_cpu is valid */ #define IORING_SETUP_CQSIZE (1U << 3) /* app defines CQ size */ +#define IORING_SETUP_CLAMP (1U << 4) /* clamp SQ/CQ ring sizes */ enum { IORING_OP_NOP, |