From: David Wei <[email protected]>
To: [email protected]
Cc: Jens Axboe <[email protected]>, Pavel Begunkov <[email protected]>
Subject: [PATCH v1 1/3] io_uring: add IORING_ENTER_NO_IOWAIT flag
Date: Fri, 16 Aug 2024 11:01:43 -0700 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
Add IORING_ENTER_NO_IOWAIT flag. If this is set then io_uring will not
set current->in_iowait prior to waiting.
Signed-off-by: David Wei <[email protected]>
---
include/uapi/linux/io_uring.h | 1 +
io_uring/io_uring.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h
index 48c440edf674..2552d4927511 100644
--- a/include/uapi/linux/io_uring.h
+++ b/include/uapi/linux/io_uring.h
@@ -508,6 +508,7 @@ struct io_cqring_offsets {
#define IORING_ENTER_EXT_ARG (1U << 3)
#define IORING_ENTER_REGISTERED_RING (1U << 4)
#define IORING_ENTER_ABS_TIMER (1U << 5)
+#define IORING_ENTER_NO_IOWAIT (1U << 6)
/*
* Passed in for io_uring_setup(2). Copied back with updated info on success
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 20229e72b65c..4cc905b228a5 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -3155,7 +3155,7 @@ SYSCALL_DEFINE6(io_uring_enter, unsigned int, fd, u32, to_submit,
if (unlikely(flags & ~(IORING_ENTER_GETEVENTS | IORING_ENTER_SQ_WAKEUP |
IORING_ENTER_SQ_WAIT | IORING_ENTER_EXT_ARG |
IORING_ENTER_REGISTERED_RING |
- IORING_ENTER_ABS_TIMER)))
+ IORING_ENTER_ABS_TIMER | IORING_ENTER_NO_IOWAIT)))
return -EINVAL;
/*
--
2.43.5
next prev parent reply other threads:[~2024-08-16 18:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-16 18:01 [PATCH v1 0/3] io_uring: add option to not set in_iowait David Wei
2024-08-16 18:01 ` David Wei [this message]
2024-08-16 18:35 ` [PATCH v1 1/3] io_uring: add IORING_ENTER_NO_IOWAIT flag Jens Axboe
2024-08-16 18:01 ` [PATCH v1 2/3] io_uring: do not set no_iowait if IORING_ENTER_NO_WAIT David Wei
2024-08-16 18:38 ` Jens Axboe
2024-08-16 22:23 ` David Wei
2024-08-16 18:49 ` Jens Axboe
2024-08-16 18:01 ` [PATCH v1 3/3] io_uring: add IORING_FEAT_IOWAIT_TOGGLE feature flag David Wei
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] \
/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