Skip to contentSkip to conversation

manpage improvements

PATCH Applied Gabriel Krisman Bertazi 2 participants 4 messages Apr 3, 2024 – Apr 6, 2024 io_uring

lore
Share & tools
lore
#0 lore raw

cover manpage improvements

Just sweeping through github issues.

Gabriel Krisman Bertazi (2):
man/io_uring_enter.2: Move poll update behavior to poll remove man/io_uring_setup.2: Improve IORING_SETUP_REGISTERED_FD_ONLY
documentation

 man/io_uring_enter.2 | 48 ++++++++++++++++++--------------------------
 man/io_uring_setup.2 |  7 +++++++
 2 files changed, 27 insertions(+), 28 deletions(-)
Signature · 1 line
2.44.0
#1 lore raw

PATCH 1/2 man/io_uring_enter.2: Move poll update behavior to poll remove

Since early days of OP_POLL_*, we had kernel commit c5de00366e3e ("io_uring: move poll update into remove not add"), which disabled poll update in the POLL_ADD path and moved it to POLL_REMOVE. This updates the man page to reflect that change.

---
 man/io_uring_enter.2 | 48 ++++++++++++++++++--------------------------
 1 file changed, 20 insertions(+), 28 deletions(-)
man/io_uring_enter.2 +20 -28
index 7d04d47..ab73d54 100644
@@ -302,6 +302,24 @@ the original request. If this flag isn't set on completion, then the poll
 request has been terminated and no further events will be generated. This mode
 is available since 5.13.
 
+This command works like
+an async
+.BR poll(2)
+and the completion event result is the returned mask of events.
+.TP
+.B IORING_OP_POLL_REMOVE
+Remove or update an existing poll request.  If found, the
+.I res
+field of the
+.I "struct io_uring_cqe"
+will contain 0.  If not found,
+.I res
+will contain
+.B -ENOENT,
+or
+.B -EALREADY
+if the poll request was in the process of completing already.
+
 If
 .B IORING_POLL_UPDATE_EVENTS
 is set in the SQE
@@ -311,8 +329,7 @@ events passed in with this request. The lookup is based on the
 .I user_data
 field of the original SQE submitted, and this values is passed in the
 .I addr
-field of the SQE. This mode is available since 5.13.
-
+field of the SQE.
 If
 .B IORING_POLL_UPDATE_USER_DATA
 is set in the SQE
@@ -321,32 +338,7 @@ field, then the request will update the
 .I user_data
 of an existing poll request based on the value passed in the
 .I off
-field. This mode is available since 5.13.
-
-This command works like
-an async
-.BR poll(2)
-and the completion event result is the returned mask of events. For the
-variants that update
-.I user_data
-or
-.I events
-, the completion result will be similar to
-.B IORING_OP_POLL_REMOVE.
-
-.TP
-.B IORING_OP_POLL_REMOVE
-Remove an existing poll request.  If found, the
-.I res
-field of the
-.I "struct io_uring_cqe"
-will contain 0.  If not found,
-.I res
-will contain
-.B -ENOENT,
-or
-.B -EALREADY
-if the poll request was in the process of completing already.
+field. Updating an existing poll is available since 5.13.
 
 .TP
 .B IORING_OP_EPOLL_CTL
Signature · 1 line
2.44.0
#2 lore raw

PATCH 2/2 man/io_uring_setup.2: Improve IORING_SETUP_REGISTERED_FD_ONLY documentation

In reply to Gabriel Krisman Bertazi

Document that IORING_SETUP_REGISTERED_FD_ONLY depends on IORING_SETUP_NO_MMAP being set.

---
 man/io_uring_setup.2 | 7 +++++++
 1 file changed, 7 insertions(+)
man/io_uring_setup.2 +7 -0
index f65c1f2..888e82b 100644
@@ -325,6 +325,9 @@ file descriptor. The caller will need to use
 .B IORING_REGISTER_USE_REGISTERED_RING
 when calling
 .BR io_uring_register (2).
+This flag only makes sense when used alongside with
+.B IORING_SETUP_NO_MMAP,
+which also needs to be set.
 Available since 6.5.
 
 .TP
@@ -690,6 +693,10 @@ was not, or
 was specified, but
 .I io_uring_params.cq_entries
 was invalid.
+.B IORING_SETUP_REGISTERED_FD_ONLY
+was specified, but
+.B IORING_SETUP_NO_MMAP
+was not.
 .TP
 .B EMFILE
 The per-process limit on the number of open file descriptors has been
Signature · 1 line
2.44.0
maintainer Applied
#3 lore raw
In reply to Gabriel Krisman Bertazi
Quoted 8 lines · Gabriel Krisman Bertazi

Just sweeping through github issues.

Gabriel Krisman Bertazi (2):
man/io_uring_enter.2: Move poll update behavior to poll remove man/io_uring_setup.2: Improve IORING_SETUP_REGISTERED_FD_ONLY
documentation

[...]

Applied, thanks!

[1/2] man/io_uring_enter.2: Move poll update behavior to poll remove

      commit: 501c78df8e76f3f6350207a2a1c89814bba4eb2d
[2/2] man/io_uring_setup.2: Improve IORING_SETUP_REGISTERED_FD_ONLY documentation
      commit: e4cfc721761a85ea6a257c77572546292d04bf79

Best regards,

Signature · 1 line
Jens Axboe