From: Pavel Begunkov <[email protected]>
To: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH liburing 2/2] tests: non-privileged io_uring_enter
Date: Tue, 24 Aug 2021 12:39:28 +0100 [thread overview]
Message-ID: <34c67bd613fe241a5942a1c5befecaa81cb73dc9.1629805109.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>
Decrease the ring size in io_uring_enter if can't allocate a large ring.
Signed-off-by: Pavel Begunkov <[email protected]>
---
test/io_uring_enter.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/test/io_uring_enter.c b/test/io_uring_enter.c
index 12f4ac9..4ea990c 100644
--- a/test/io_uring_enter.c
+++ b/test/io_uring_enter.c
@@ -30,6 +30,7 @@
#include "../src/syscall.h"
#define IORING_MAX_ENTRIES 4096
+#define IORING_MAX_ENTRIES_FALLBACK 128
int
expect_failed_submit(struct io_uring *ring, int error)
@@ -218,6 +219,8 @@ main(int argc, char **argv)
return 0;
ret = io_uring_queue_init(IORING_MAX_ENTRIES, &ring, 0);
+ if (ret == -ENOMEM)
+ ret = io_uring_queue_init(IORING_MAX_ENTRIES_FALLBACK, &ring, 0);
if (ret < 0) {
perror("io_uring_queue_init");
exit(1);
--
2.32.0
next prev parent reply other threads:[~2021-08-24 11:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-24 11:39 [PATCH liburing 0/2] non-privileged tests Pavel Begunkov
2021-08-24 11:39 ` [PATCH liburing 1/2] tests: non-privileged defer test Pavel Begunkov
2021-08-24 11:39 ` Pavel Begunkov [this message]
2021-08-24 14:09 ` [PATCH liburing 0/2] non-privileged tests 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 \
--in-reply-to=34c67bd613fe241a5942a1c5befecaa81cb73dc9.1629805109.git.asml.silence@gmail.com \
[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