summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/io_uring.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-10-04 12:10:03 -0600
committerJens Axboe <axboe@kernel.dk>2019-10-29 10:22:46 -0600
commit33a107f0a1b8df0ad925e39d8afc97bb78e0cec1 (patch)
tree7050b2355408fcc4fa9ab8753e195335a5126c5f /include/uapi/linux/io_uring.h
parentc3a31e605620c279163c14068a60869ea3fda203 (diff)
downloadtalos-op-linux-33a107f0a1b8df0ad925e39d8afc97bb78e0cec1.tar.gz
talos-op-linux-33a107f0a1b8df0ad925e39d8afc97bb78e0cec1.zip
io_uring: allow application controlled CQ ring size
We currently size the CQ ring as twice the SQ ring, to allow some flexibility in not overflowing the CQ ring. This is done because the SQE life time is different than that of the IO request itself, the SQE is consumed as soon as the kernel has seen the entry. Certain application don't need a huge SQ ring size, since they just submit IO in batches. But they may have a lot of requests pending, and hence need a big CQ ring to hold them all. By allowing the application to control the CQ ring size multiplier, we can cater to those applications more efficiently. If an application wants to define its own CQ ring size, it must set IORING_SETUP_CQSIZE in the setup flags, and fill out io_uring_params->cq_entries. The value must be a power of two. 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 4f532d9c0554..e0137ea6ad79 100644
--- a/include/uapi/linux/io_uring.h
+++ b/include/uapi/linux/io_uring.h
@@ -50,6 +50,7 @@ struct io_uring_sqe {
#define IORING_SETUP_IOPOLL (1U << 0) /* io_context is polled */
#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_OP_NOP 0
#define IORING_OP_READV 1
OpenPOWER on IntegriCloud