Linux::IO_Prio(3pm)
π Linux::IO_Prio π
okay bestie, so this is a Perl module β it lives in the User Contributed Perl Documentation section, and its whole personality is being a lil bridge between your Perl code and Linux's ioprio_set and ioprio_get syscalls. whether you go raw syscall or use the ionice wrapper, it's got you π«Ά
πΈ NAME πΈ
Linux::IO_Prio β it's the interface to Linux's ioprio_set and ioprio_get, reachable either via syscall or via the ionice wrapper. that's the whole vibe. no cap. β¨
π SYNOPSIS π
like, here's the tea in actual code:
use Linux::IO_Prio qw(:all);
my $status = ioprio_set(IOPRIO_WHO_PROCESS, $$,
IOPRIO_PRIO_VALUE(IOPRIO_CLASS_IDLE, 0));
my $status = ionice(IOPRIO_WHO_PROCESS, $$, IOPRIO_CLASS_IDLE, 0);
look at her go. two whole ways to say the same thing, and she ate both times π
π¦ DESCRIPTION π¦
so literally, this module lets you call ioprio_get(2) and ioprio_set(2) straight from Perl. only Linux is supported right now β that's it, that's the current roster. support for other unices is coming eventually, but only once the kernel capabilities actually exist, so don't hold your breath, bestie π
β¨ Exports β¨
default situation? nothing. zero. nada. you get nothing unless you ask, which honestly? iconic behavior. ask for what you want, individually or by tag:
:ioniceβioniceionice_dataionice_class:c_apiβioprio_setioprio_get:macroβIOPRIO_PRIO_VALUEIOPRIO_PRIO_CLASSIOPRIO_PRIO_DATA:whoβIOPRIO_WHO_PROCESSIOPRIO_WHO_PGRPIOPRIO_WHO_USER:classβIOPRIO_CLASS_NONEIOPRIO_CLASS_RTIOPRIO_CLASS_BEIOPRIO_CLASS_IDLE:allβ literally all the above π«Ά
so ionice(), ionice_class() and ionice_data() are thin little wrappers around the C API, and the whole point is letting you make convenient single function calls instead of doing the most. every other export means the exact same thing and has the exact same prototype as its C API equivalent. for the deep lore, go read man ioprio_set(2). π
π Functions π
C API:
$priority = ioprio_get($which, $who)
$staus = ioprio_set($which, $who, $priority)
yes, that's$stausup there, not$statusβ that's fr fr how it's written in the source and we do not touch the source. keeping it exactly as-is π
Wrappers:
$status = ionice($which, $who, $class, $data)
$class = ionice_class($which, $who)
$data = ionice_data($which, $who)
π MACROS π
$priority = IOPRIO_PRIO_VALUE($class, $data)
$class = IOPRIO_PRIO_CLASS($mask)
$data = IOPRIO_PRIO_DATA ($mask)
β CONSTANTS β
IOPRIO_WHO_PROCESSIOPRIO_WHO_PGRPIOPRIO_WHO_USERIOPRIO_CLASS_NONEIOPRIO_CLASS_RTIOPRIO_CLASS_BEIOPRIO_CLASS_IDLE
seven little constants, all lined up, all ready to vibe check your I/O priority π
π COPYRIGHT π
this module is Copyright (c) 2011 Mark Hindley
all rights reserved, periodt.
you may distribute it under the terms of either the GNU General Public License or the Artistic License, exactly as specified in the Perl README file. and if you need more liberal licensing terms than that? bestie, just contact the maintainer. π
π WARRANTY π
this is free software. IT COMES WITHOUT WARRANTY OF ANY KIND. all caps, all drama, all facts. don't come for her if it breaks π
π§ AUTHOR π§
Mark Hindley <mark@hindley.org.uk>
and that's a wrap on this page, babes β¨ it was written up for perl v5.40.1, dated 2025-08-10, and it lives its life under the name Linux::IO_Prio(3pm) β the manual for a little module that is honestly so real. go set some I/O priorities, you main character πΈπ
π¦ where this page comes from
- ubuntu resolute: liblinux-io-prio-perl 0.03-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: liblinux-io-prio-perl 0.03-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms