All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bijan Mottahedeh <bijan.mottahedeh@oracle.com>
To: axboe@kernel.dk, io-uring@vger.kernel.org
Subject: [PATCH v2 09/10] man/io_uring_register.2: document buffer registration updates
Date: Fri, 22 Jan 2021 14:54:58 -0800	[thread overview]
Message-ID: <1611356099-60732-10-git-send-email-bijan.mottahedeh@oracle.com> (raw)
In-Reply-To: <1611356099-60732-1-git-send-email-bijan.mottahedeh@oracle.com>

Document sparse buffer registrations and IORING_REGISER_BUFFER_UPDATE.

Signed-off-by: Bijan Mottahedeh <bijan.mottahedeh@oracle.com>
---
 man/io_uring_register.2 | 29 ++++++++++++++++++++++++-----
 1 file changed, 24 insertions(+), 5 deletions(-)

diff --git a/man/io_uring_register.2 b/man/io_uring_register.2
index 225e461..5c7a39e 100644
--- a/man/io_uring_register.2
+++ b/man/io_uring_register.2
@@ -82,11 +82,13 @@ It is perfectly valid to setup a large buffer and then only use part
 of it for an I/O, as long as the range is within the originally mapped
 region.
 
-An application can increase or decrease the size or number of
-registered buffers by first unregistering the existing buffers, and
-then issuing a new call to
-.BR io_uring_register ()
-with the new buffers.
+The buffer set may be sparse, meaning that the
+.B iovec
+address and size fields in the array may be set to
+.B 0.
+See
+.B IORING_REGISTER_BUFFERS_UPDATE
+for how to update buffers in place.
 
 Note that registering buffers will wait for the ring to idle. If the application
 currently has requests in-flight, the registration will wait for those to
@@ -103,6 +105,20 @@ must be passed as NULL.  All previously registered buffers associated
 with the io_uring instance will be released. Available since 5.1.
 
 .TP
+.B IORING_REGISTER_BUFFERS_UPDATE
+This operation replaces existing iovecs in the registered buffer set with
+new ones, either turning a sparse entry (one where iovec base and len
+are equal to 0) into a real one, removing an existing entry (new one is
+set to 0), or replacing an existing entry with a new existing entry.
+.I arg
+must contain a pointer to a struct io_uring_rsrc_update, which contains
+an offset on which to start the update, and an array of iovecs to
+use for the update.
+.I nr_args
+must contain the number of iovecs in the passed in array. Available
+since 5.12.
+
+.TP
 .B IORING_REGISTER_FILES
 Register files for I/O.
 .I arg
@@ -152,6 +168,9 @@ use for the update.
 must contain the number of descriptors in the passed in array. Available
 since 5.5.
 
+Note that struct io_uring_files_update is deprecated since 5.12 and that
+io_uring_rsrc_update must be used instead.
+
 .TP
 .B IORING_UNREGISTER_FILES
 This operation requires no argument, and
-- 
1.8.3.1


  parent reply	other threads:[~2021-01-22 22:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-22 22:54 [PATCH v2 00/10] liburing: buffer registration enhancements Bijan Mottahedeh
2021-01-22 22:54 ` [PATCH v2 01/10] liburing: support buffer registration updates Bijan Mottahedeh
2021-01-22 22:54 ` [PATCH v2 02/10] liburing: support buffer registration sharing Bijan Mottahedeh
2021-01-22 22:54 ` [PATCH v2 03/10] test/buffer-register: add buffer registration test Bijan Mottahedeh
2021-01-22 22:54 ` [PATCH v2 04/10] test/buffer-update: add buffer registration update test Bijan Mottahedeh
2021-01-22 22:54 ` [PATCH v2 05/10] test/buffer-share: add buffer registration sharing test Bijan Mottahedeh
2021-01-22 22:54 ` [PATCH v2 06/10] test/buffer-share: add private memory option Bijan Mottahedeh
2021-01-22 22:54 ` [PATCH v2 07/10] test/buffer-share: add interruptible deadlock test Bijan Mottahedeh
2021-01-22 22:54 ` [PATCH v2 08/10] man/io_uring_setup.2: document buffer registration sharing Bijan Mottahedeh
2021-01-22 22:54 ` Bijan Mottahedeh [this message]
2021-01-22 22:54 ` [PATCH v2 10/10] man/io_uring_enter.2: document IORING_OP_BUFFERS_UPDATE Bijan Mottahedeh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1611356099-60732-10-git-send-email-bijan.mottahedeh@oracle.com \
    --to=bijan.mottahedeh@oracle.com \
    --cc=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.