NAME |SYNOPSIS |DESCRIPTION |RETURN VALUE |SEE ALSO |COLOPHON | |
io_uring_set_iowait(3) liburing Manualio_uring_set_iowait(3)io_uring_set_iowait - toggle of iowait usage when waiting on CQEs
#include <liburing.h>int io_uring_set_iowait(struct io_uring *ring,boolenable_iowait);
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. Theio_uring_set_iowait(3) function allows the user to toggle this behavior. Ifenable_iowaitis 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 setIORING_ENTER_NO_IOWAITin theflagsargument toio_uring_enter(2). If the kernel supports this feature, it will be marked by having theIORING_FEAT_NO_IOWAITfeature flag set. Available since kernel 6.15.
On success,io_uring_set_iowait(3) returns 0. On failure, it returns-EOPNOTSUPP.
io_uring_enter(2),io_uring_submit(3),io_uring_submit_and_wait(3)
This page is part of theliburing (A library for io_uring) project. Information about the project can be found at ⟨https://github.com/axboe/liburing⟩. If you have a bug report for this manual page, send it to io-uring@vger.kernel.org. This page was obtained from the project's upstream Git repository ⟨https://github.com/axboe/liburing⟩ on 2025-08-11. (At that time, the date of the most recent commit that was found in the repository was 2025-08-02.) If you discover any rendering problems in this HTML version of the page, or you believe there is a better or more up-to-date source for the page, or you have corrections or improvements to the information in this COLOPHON (which isnot part of the original manual page), send a mail to man-pages@man7.orgliburing-2.12 July 27, 2025io_uring_set_iowait(3)Pages that refer to this page:io_uring_set_iowait(3)
HTML rendering created 2025-09-06 byMichael Kerrisk, author ofThe Linux Programming Interface. For details of in-depthLinux/UNIX system programming training courses that I teach, lookhere. Hosting byjambit GmbH. | ![]() |