public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH liburing 0/2] manpage improvements
@ 2024-04-03 16:44 Gabriel Krisman Bertazi
  2024-04-03 16:44 ` [PATCH liburing 1/2] man/io_uring_enter.2: Move poll update behavior to poll remove Gabriel Krisman Bertazi
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Gabriel Krisman Bertazi @ 2024-04-03 16:44 UTC (permalink / raw)
  To: axboe; +Cc: io-uring, 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

 man/io_uring_enter.2 | 48 ++++++++++++++++++--------------------------
 man/io_uring_setup.2 |  7 +++++++
 2 files changed, 27 insertions(+), 28 deletions(-)

-- 
2.44.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH liburing 1/2] man/io_uring_enter.2:  Move poll update behavior to poll remove
  2024-04-03 16:44 [PATCH liburing 0/2] manpage improvements Gabriel Krisman Bertazi
@ 2024-04-03 16:44 ` Gabriel Krisman Bertazi
  2024-04-03 16:44 ` [PATCH liburing 2/2] man/io_uring_setup.2: Improve IORING_SETUP_REGISTERED_FD_ONLY documentation Gabriel Krisman Bertazi
  2024-04-06  2:12 ` [PATCH liburing 0/2] manpage improvements Jens Axboe
  2 siblings, 0 replies; 4+ messages in thread
From: Gabriel Krisman Bertazi @ 2024-04-03 16:44 UTC (permalink / raw)
  To: axboe; +Cc: io-uring, Gabriel Krisman Bertazi

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.

Closes: https://github.com/axboe/liburing/pull/1095
Signed-off-by: Gabriel Krisman Bertazi <[email protected]>
---
 man/io_uring_enter.2 | 48 ++++++++++++++++++--------------------------
 1 file changed, 20 insertions(+), 28 deletions(-)

diff --git a/man/io_uring_enter.2 b/man/io_uring_enter.2
index 7d04d47..ab73d54 100644
--- a/man/io_uring_enter.2
+++ b/man/io_uring_enter.2
@@ -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
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH liburing 2/2] man/io_uring_setup.2: Improve IORING_SETUP_REGISTERED_FD_ONLY documentation
  2024-04-03 16:44 [PATCH liburing 0/2] manpage improvements Gabriel Krisman Bertazi
  2024-04-03 16:44 ` [PATCH liburing 1/2] man/io_uring_enter.2: Move poll update behavior to poll remove Gabriel Krisman Bertazi
@ 2024-04-03 16:44 ` Gabriel Krisman Bertazi
  2024-04-06  2:12 ` [PATCH liburing 0/2] manpage improvements Jens Axboe
  2 siblings, 0 replies; 4+ messages in thread
From: Gabriel Krisman Bertazi @ 2024-04-03 16:44 UTC (permalink / raw)
  To: axboe; +Cc: io-uring, Gabriel Krisman Bertazi

Document that IORING_SETUP_REGISTERED_FD_ONLY depends on
IORING_SETUP_NO_MMAP being set.

Closes: https://github.com/axboe/liburing/issues/1087
Signed-off-by: Gabriel Krisman Bertazi <[email protected]>
---
 man/io_uring_setup.2 | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/man/io_uring_setup.2 b/man/io_uring_setup.2
index f65c1f2..888e82b 100644
--- a/man/io_uring_setup.2
+++ b/man/io_uring_setup.2
@@ -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
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH liburing 0/2] manpage improvements
  2024-04-03 16:44 [PATCH liburing 0/2] manpage improvements Gabriel Krisman Bertazi
  2024-04-03 16:44 ` [PATCH liburing 1/2] man/io_uring_enter.2: Move poll update behavior to poll remove Gabriel Krisman Bertazi
  2024-04-03 16:44 ` [PATCH liburing 2/2] man/io_uring_setup.2: Improve IORING_SETUP_REGISTERED_FD_ONLY documentation Gabriel Krisman Bertazi
@ 2024-04-06  2:12 ` Jens Axboe
  2 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2024-04-06  2:12 UTC (permalink / raw)
  To: Gabriel Krisman Bertazi; +Cc: io-uring


On Wed, 03 Apr 2024 12:44:11 -0400, Gabriel Krisman Bertazi wrote:
> 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,
-- 
Jens Axboe




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-04-06  2:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-03 16:44 [PATCH liburing 0/2] manpage improvements Gabriel Krisman Bertazi
2024-04-03 16:44 ` [PATCH liburing 1/2] man/io_uring_enter.2: Move poll update behavior to poll remove Gabriel Krisman Bertazi
2024-04-03 16:44 ` [PATCH liburing 2/2] man/io_uring_setup.2: Improve IORING_SETUP_REGISTERED_FD_ONLY documentation Gabriel Krisman Bertazi
2024-04-06  2:12 ` [PATCH liburing 0/2] manpage improvements Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox