io_uring_register_iowq_max_workers(3) — Linux manual page

NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | SEE ALSO | COLOPHON

io_uring_re...max_workers(3) liburing Manualio_uring_re...max_workers(3)

NAME         top

       io_uring_register_iowq_max_workers - modify the maximum allowed
       async workers

SYNOPSIS         top

       #include <liburing.h>

       int io_uring_register_iowq_max_workers(struct io_uring *ring,
                                              unsigned int *values);

DESCRIPTION         top

       io_uring async workers are split into two types:

       Bounded
              These workers have a bounded execution time. Examples of
              that are filesystem reads, which normally complete in a
              relatively short amount of time. In case of disk failures,
              they are still bounded by a timeout operation that will
              abort them if exceeded.

       Unbounded
              Work items here may take an indefinite amount of time to
              complete. Examples include doing IO to sockets, pipes, or
              any other non-regular type of file.

       By default, the amount of bounded IO workers is limited to how
       many SQ entries the ring was setup with, or 4 times the number of
       online CPUs in the system, whichever is smaller. Unbounded
       workers are only limited by the process task limit, as indicated
       by the rlimit RLIMIT_NPROC limit.

       This can be modified by calling
       io_uring_register_iowq_max_workers with ring set to the ring in
       question, and values pointing to an array of two values. The
       first element should contain the number of desired bounded
       workers, and the second element should contain the number of
       desired unbounded workers. These are both maximum values,
       io_uring will not maintain a high count of idle workers, they are
       reaped when they are not necessary anymore.

       If called with both values set to 0, the existing values are
       returned.

RETURN VALUE         top

       Returns 0 on success, with values containing the previous values
       for the settings. On error, any of the following may be returned.

       -EFAULT
              The kernel was unable to copy the memory pointer to by
              values as it was invalid.

       -EINVAL
              values was NULL or the new values exceeded the maximum
              allowed value.

SEE ALSO         top

       io_uring_queue_init(3), io_uring_register(2)

COLOPHON         top

       This page is part of the liburing (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 2024-06-14.  (At that
       time, the date of the most recent commit that was found in the
       repository was 2024-06-03.)  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 is not part of the original manual page), send a mail to
       man-pages@man7.org

liburing-2.2                 March 13, 2022 io_uring_re...max_workers(3)