3 unstable releases

0.2.0 Jun 8, 2021
0.1.1 Jan 8, 2021
0.1.0 Jan 8, 2021

#751 in Unix APIs

Download history 47/week @ 2024-03-11 531/week @ 2024-03-18 80/week @ 2024-03-25 229/week @ 2024-04-01 216/week @ 2024-04-08 262/week @ 2024-04-15 279/week @ 2024-04-22 844/week @ 2024-04-29 621/week @ 2024-05-06 482/week @ 2024-05-13 644/week @ 2024-05-20 442/week @ 2024-05-27 168/week @ 2024-06-03 192/week @ 2024-06-10 29/week @ 2024-06-17 30/week @ 2024-06-24

422 downloads per month
Used in 3 crates

MIT license

13KB
218 lines

ioprio-rs

A crate for managing Linux I/O priorities, either globally for one or more processes, or in advanced interfaces such as io_uring and Linux AIO. It allows setting the ioprio field of io_uring SQE:s directly when the iou Cargo feature is enabled.


lib.rs:

This is a simple crate for managing Linux-specific I/O priorities, which are usable with interfaces such as io_uring, Linux AIO, and can also be set globally for a single process or group.

Note that these priorities are Linux-specific, and the actual interpretation of what these 16-bit masks is only defined in linux/ioprio.h and linux/Documentation/block/ioprio.rst, which is only available in the Linux source, despite the syscalls having documentation as man pages. This library is based on Linux 5.10 interface and documentation, although the interface has not changed much whatsoever since it was introduced in Linux 2.6.13.

Also, setting I/O priorities only has an effect when the Completely Fair I/O Scheduler is in use, which is the default I/O scheduler.

Refer to the ioprio_set(2) syscall man page for more information about these API:s.

Dependencies

~2MB
~39K SLoC