* [PATCH liburing] man/io_uring_enter.2: document IOSQE_CQE_SKIP_SUCCESS
@ 2021-11-27 1:50 Pavel Begunkov
2021-11-27 14:08 ` Jens Axboe
0 siblings, 1 reply; 3+ messages in thread
From: Pavel Begunkov @ 2021-11-27 1:50 UTC (permalink / raw)
To: io-uring; +Cc: asml.silence
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-28 15:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-27 1:50 [PATCH liburing] man/io_uring_enter.2: document IOSQE_CQE_SKIP_SUCCESS Pavel Begunkov
2021-11-27 14:08 ` Jens Axboe
2021-11-28 15:32 ` Pavel Begunkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox