path: root/man
diff options
authorJens Axboe <>2019-12-25 21:40:46 -0700
committerJens Axboe <>2019-12-25 21:40:46 -0700
commit93eccf82a908ceb13061d95807b8f119d50b1b90 (patch)
tree8719f5d6799ef6f48292ff0fb04f0a563d967df2 /man
parentd667b7e2c25a14feec612683a9f6fc181787df71 (diff)
parent5ebe4b170b54df467fc1ff72c56be880f52687b0 (diff)
Merge branch 'offset' of
* 'offset' of io_uring.h: add IORING_FEAT_RW_CUR_POS flag
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