3 unstable releases

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

#673 in Unix APIs

Download history 101/week @ 2024-07-25 232/week @ 2024-08-01 286/week @ 2024-08-08 284/week @ 2024-08-15 370/week @ 2024-08-22 135/week @ 2024-08-29 338/week @ 2024-09-05 140/week @ 2024-09-12 136/week @ 2024-09-19 330/week @ 2024-09-26 237/week @ 2024-10-03 181/week @ 2024-10-10 236/week @ 2024-10-17 103/week @ 2024-10-24 311/week @ 2024-10-31 100/week @ 2024-11-07

814 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