public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: [PATCH liburing] man/io_uring_enter.2: document IOSQE_CQE_SKIP_SUCCESS
Date: Sat, 27 Nov 2021 01:50:25 +0000	[thread overview]
Message-ID: <381237725f0f09a2668ea7f38b804d5733595b1f.1637977800.git.asml.silence@gmail.com> (raw)

Add a section about IOSQE_CQE_SKIP_SUCCESS describing the behaviour and
use cases.

Signed-off-by: Pavel Begunkov <[email protected]>
---
 man/io_uring_enter.2 | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/man/io_uring_enter.2 b/man/io_uring_enter.2
index 93b97e6..710e84e 100644
--- a/man/io_uring_enter.2
+++ b/man/io_uring_enter.2
@@ -1094,6 +1094,30 @@ are available and this flag is set, then the request will fail with
 as the error code. Once a buffer has been used, it is no longer available in
 the kernel pool. The application must re-register the given buffer again when
 it is ready to recycle it (eg has completed using it). Available since 5.7.
+.TP
+.B IOSQE_CQE_SKIP_SUCCESS
+Instruct to not generate a CQE if the request completes successfully. If the
+request fails an appropriate CQE will be posted as usual and if there is no
+.B IOSQE_IO_HARDLINK,
+CQEs for all linked requests will be omitted. The notion
+of failure/success is opcode specific and is the same as with breaking chains
+of
+.B IOSQE_IO_LINK.
+One special case is when the request has a linked timeout, then the CQE
+generation for the linked timeout is decided solely by whether it has
+.B IOSQE_CQE_SKIP_SUCCESS
+set, regardless whether it timed out or
+was cancelled. In other words, if a linked timeout has the flag set, it's
+guaranteed to not post a CQE.
+
+The semantics is chosen to accommodate several use cases. First, when all but
+last requests of a normal link without linked timeouts are marked with the flag,
+it guarantees to post only one CQE per link. Also, it makes possible to suppress
+CQEs in cases where side effects of a successfully executed operation will be
+enough for the userspace to know the state of the system, e.g. writing to
+a synchronisation file.
+
+Available since 5.17.
 
 .PP
 .I ioprio
-- 
2.34.0


             reply	other threads:[~2021-11-27  2:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-27  1:50 Pavel Begunkov [this message]
2021-11-27 14:08 ` [PATCH liburing] man/io_uring_enter.2: document IOSQE_CQE_SKIP_SUCCESS Jens Axboe
2021-11-28 15:32   ` Pavel Begunkov

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=381237725f0f09a2668ea7f38b804d5733595b1f.1637977800.git.asml.silence@gmail.com \
    [email protected] \
    [email protected] \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox