From: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Cc: Ammar Faizi <ammarfaizi2@gnuweeb.org>,
Alviro Iskandar Setiawan <alviro.iskandar@gnuweeb.org>,
GNU/Weeb Mailing List <gwml@vger.gnuweeb.org>,
Christian Mazakas <christian.mazakas@gmail.com>,
io-uring Mailing List <io-uring@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH liburing v2 1/3] man: Add `io_uring_set_iowait(3)`
Date: Sun, 27 Jul 2025 08:02:49 +0700 [thread overview]
Message-ID: <20250727010251.3363627-2-ammarfaizi2@gnuweeb.org> (raw)
In-Reply-To: <20250727010251.3363627-1-ammarfaizi2@gnuweeb.org>
Based on an explanation from the Linux kernel upstream commit:
07754bfd9aee ("io_uring: enable toggle of iowait usage when waiting on CQEs")
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
---
man/io_uring_set_iowait.3 | 57 +++++++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)
create mode 100644 man/io_uring_set_iowait.3
diff --git a/man/io_uring_set_iowait.3 b/man/io_uring_set_iowait.3
new file mode 100644
index 000000000000..5caf0a3a4cc6
--- /dev/null
+++ b/man/io_uring_set_iowait.3
@@ -0,0 +1,57 @@
+.\" Copyright (C) 2025 Jens Axboe <axboe@kernel.dk>
+.\" Copyright (C) 2025 Ammar Faizi <ammarfaizi2@gnuweeb.org>
+.\"
+.\" SPDX-License-Identifier: LGPL-2.0-or-later
+.\"
+.TH io_uring_set_iowait 3 "July 27, 2025" "liburing-2.12" "liburing Manual"
+.SH NAME
+io_uring_set_iowait \- toggle of iowait usage when waiting on CQEs
+.SH SYNOPSIS
+.nf
+.B #include <liburing.h>
+.PP
+.BI "int io_uring_set_iowait(struct io_uring *" ring ",
+.BI " bool " enable_iowait ");"
+.fi
+.SH DESCRIPTION
+.PP
+By default, io_uring marks a waiting task as being in iowait if it's
+sleeping waiting on events and there are pending requests. This isn't
+necessarily always useful, and may be confusing on non-storage setups
+where iowait isn't expected. It can also cause extra power usage by
+preventing the CPU from entering lower sleep states.
+
+The
+.BR io_uring_set_iowait (3)
+function allows the user to toggle this behavior. If
+.BI enable_iowait
+is set to true, the iowait behavior is enabled. If it is set to false,
+the iowait behavior is disabled. The iowait behavior is enabled by
+default when a ring is created.
+
+If the iowait is disabled, the submit functions will set
+.B IORING_ENTER_NO_IOWAIT
+in the
+.BI flags
+argument to
+.BR io_uring_enter (2).
+
+If the kernel supports this feature, it will be marked by having
+the
+.B IORING_FEAT_NO_IOWAIT
+feature flag set.
+
+Available since kernel 6.15.
+
+
+.SH RETURN VALUE
+On success,
+.BR io_uring_set_iowait (3)
+returns 0. On failure, it returns
+.BR -EOPNOTSUPP .
+
+
+.SH SEE ALSO
+.BR io_uring_enter (2),
+.BR io_uring_submit (3),
+.BR io_uring_submit_and_wait (3)
--
Ammar Faizi
next prev parent reply other threads:[~2025-07-27 1:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-27 1:02 [PATCH liburing v2 0/3] Manpage updates for iowait toggle feature and one extra FFI fix Ammar Faizi
2025-07-27 1:02 ` Ammar Faizi [this message]
2025-07-27 1:02 ` [PATCH liburing v2 2/3] man: Add `IORING_ENTER_NO_IOWAIT` flag Ammar Faizi
2025-07-27 1:02 ` [PATCH liburing v2 3/3] liburing: Don't use `IOURINGINLINE` on private helpers Ammar Faizi
2025-07-27 1:14 ` [PATCH liburing v2 0/3] Manpage updates for iowait toggle feature and one extra FFI fix Ammar Faizi
2025-07-27 3:52 ` 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=20250727010251.3363627-2-ammarfaizi2@gnuweeb.org \
--to=ammarfaizi2@gnuweeb.org \
--cc=alviro.iskandar@gnuweeb.org \
--cc=christian.mazakas@gmail.com \
--cc=gwml@vger.gnuweeb.org \
--cc=io-uring@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.