diff options
| author | Jens Axboe <[email protected]> | 2019-09-06 10:26:21 -0600 |
|---|---|---|
| committer | Jens Axboe <[email protected]> | 2019-09-06 10:26:21 -0600 |
| commit | ac90f249e15cd2a850daa9e36e15f81ce1ff6550 (patch) | |
| tree | ae3942ae20234c0fdc5265d19a53fb865486a552 /include/uapi/linux | |
| parent | 75b28affdd6aed1c68073ef53907c7bd822aff84 (diff) | |
io_uring: expose single mmap capability
After commit 75b28affdd6a we can get by with just a single mmap to
map both the sq and cq ring. However, userspace doesn't know that.
Add a features variable to io_uring_params, and notify userspace
that the kernel has this ability. This can then be used in liburing
(or in applications directly) to avoid the second mmap.
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/io_uring.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h index 1e1652f25cc1..96ee9d94b73e 100644 --- a/include/uapi/linux/io_uring.h +++ b/include/uapi/linux/io_uring.h @@ -128,12 +128,18 @@ struct io_uring_params { __u32 flags; __u32 sq_thread_cpu; __u32 sq_thread_idle; - __u32 resv[5]; + __u32 features; + __u32 resv[4]; struct io_sqring_offsets sq_off; struct io_cqring_offsets cq_off; }; /* + * io_uring_params->features flags + */ +#define IORING_FEAT_SINGLE_MMAP (1U << 0) + +/* * io_uring_register(2) opcodes and arguments */ #define IORING_REGISTER_BUFFERS 0 |