path: root/man
diff options
authorCarter Li <>2019-12-26 11:09:40 +0800
committerCarter Li <>2019-12-26 12:33:38 +0800
commit5ebe4b170b54df467fc1ff72c56be880f52687b0 (patch)
tree540e1978580e706657b6da744b91fde60bd4544e /man
parent8f97d6efafcf0fc039de36e0d06698076f15a6dc (diff)
io_uring.h: add IORING_FEAT_RW_CUR_POS flag
and document it Signed-off-by: Carter Li <>
Diffstat (limited to 'man')
1 files changed, 45 insertions, 1 deletions
diff --git a/man/io_uring_setup.2 b/man/io_uring_setup.2
index c6e3dec..4245579 100644
--- a/man/io_uring_setup.2
+++ b/man/io_uring_setup.2
@@ -38,7 +38,8 @@ 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;
@@ -148,6 +149,49 @@ The
.I resv
array must be initialized to zero.
+.I features
+is filled in by the kernel, which specifies various features supported
+by current kernel version.
+If this flag is set, the two SQ and CQ rings can be mapped with a single
+.I mmap(2)
+call. The SQEs must still be allocated separately. This brings the necessary
+.I mmap(2)
+calls down from three to two.
+If this flag is set, io_uring supports never dropping completion events.
+If a completion event occurs and the CQ ring is full, the kernel stores
+the event internally until such a time that the CQ ring has room for more
+entries. If this overflow condition is entered, attempting to submit more
+IO with fail with the
+error value, if it can't flush the overflown events to the CQ ring. If this
+happens, the application must reap events from the CQ ring and attempt the
+submit again.
+If this flag is set, applications can be certain that any data for
+async offload has been consumed when the kernel has consumed the SQE.
+If this flag is set, applications can specify offset == -1 with
+to mean file position, which behaves like
+.I preadv2(2)
+.I pwritev2(2)
+with offset == -1, it'll use (and update) the current
+file position. This obviously comes with the caveat that if the
+application has multiple read/writes in flight, then the end result
+will not be as expected. This is similar to threads sharing a file
+descriptor and doing IO using the current file position.
The rest of the fields in the
.I struct io_uring_params
are filled in by the kernel, and provide the information necessary to