3 unstable releases

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

#685 in Unix APIs

Download history 22/week @ 2023-12-02 42/week @ 2023-12-09 38/week @ 2023-12-16 44/week @ 2023-12-23 38/week @ 2023-12-30 85/week @ 2024-01-06 40/week @ 2024-01-13 16/week @ 2024-01-20 4/week @ 2024-01-27 50/week @ 2024-02-03 21/week @ 2024-02-10 25/week @ 2024-02-17 74/week @ 2024-02-24 135/week @ 2024-03-02 77/week @ 2024-03-09 234/week @ 2024-03-16

524 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

~1.5MB
~38K SLoC