From: Dylan Yudaken <[email protected]>
To: <[email protected]>
Cc: <[email protected]>, <[email protected]>, <[email protected]>,
Dylan Yudaken <[email protected]>
Subject: [PATCH liburing 4/5] add docs for overflow lost errors
Date: Thu, 21 Apr 2022 02:14:26 -0700 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
Add man docs for return values indicating a CQE was lost.
Signed-off-by: Dylan Yudaken <[email protected]>
---
man/io_uring_enter.2 | 11 +++++++++++
man/io_uring_setup.2 | 11 +++++++++--
2 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/man/io_uring_enter.2 b/man/io_uring_enter.2
index 3112355..15ef9d1 100644
--- a/man/io_uring_enter.2
+++ b/man/io_uring_enter.2
@@ -1326,6 +1326,17 @@ is a valid file descriptor, but the io_uring ring is not in the right state
.BR io_uring_register (2)
for details on how to enable the ring.
.TP
+.B EBADR
+At least one CQE was dropped even with the
+.B IORING_FEAT_NODROP
+feature, and there are no otherwise available CQEs. This clears the error state
+and so with no other changes the next call to
+.BR io_uring_setup (2)
+will not have this error. This error should be extremely rare and indicates the
+machine is running critically low on memory and. It may be reasonable for the
+application to terminate running unless it is able to safely handle any CQE
+being lost.
+.TP
.B EBUSY
If the
.B IORING_FEAT_NODROP
diff --git a/man/io_uring_setup.2 b/man/io_uring_setup.2
index f3911af..2f617c1 100644
--- a/man/io_uring_setup.2
+++ b/man/io_uring_setup.2
@@ -218,7 +218,7 @@ call. The SQEs must still be allocated separately. This brings the necessary
calls down from three to two. Available since kernel 5.4.
.TP
.B IORING_FEAT_NODROP
-If this flag is set, io_uring supports never dropping completion events.
+If this flag is set, io_uring supports almost never dropping completion events.
If a completion event occurs and the CQ ring is full, the kernel stores
the event internally until such a time that the CQ ring has room for more
entries. If this overflow condition is entered, attempting to submit more
@@ -226,7 +226,14 @@ IO will fail with the
.B -EBUSY
error value, if it can't flush the overflown events to the CQ ring. If this
happens, the application must reap events from the CQ ring and attempt the
-submit again. Available since kernel 5.5.
+submit again. If the kernel has no free memory to store the event internally
+it will be visible by an increase in the overflow value on the cqring.
+Available since kernel 5.5. Additionally
+.BR io_uring_enter (2)
+will return
+.B -EBADR
+the next time it would otherwise sleep waiting for completions (since kernel 5.19).
+
.TP
.B IORING_FEAT_SUBMIT_STABLE
If this flag is set, applications can be certain that any data for
--
2.30.2
next prev parent reply other threads:[~2022-04-21 9:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-21 9:14 [PATCH liburing 0/5] overflow support Dylan Yudaken
2022-04-21 9:14 ` [PATCH liburing 1/5] fix documentation shortenings Dylan Yudaken
2022-04-21 9:14 ` [PATCH liburing 2/5] update io_uring_enter.2 docs for IORING_FEAT_NODROP Dylan Yudaken
2022-04-21 9:14 ` [PATCH liburing 3/5] expose CQ ring overflow state Dylan Yudaken
2022-04-21 9:14 ` Dylan Yudaken [this message]
2022-04-21 9:14 ` [PATCH liburing 5/5] overflow: add tests Dylan Yudaken
2022-04-21 11:44 ` Ammar Faizi
2022-04-21 13:04 ` Dylan Yudaken
2022-04-21 19:49 ` Jens Axboe
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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[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