| |||||
| |||||
![]() |
|||||
|
IOPRIO_SET
2
2008-07-09
Linux
Linux Programmer's Manual
ioprio_get () and ioprio_set () system calls respectively get and set the I/O scheduling class and priority of one or more processes. The which and who arguments identify the process(es) on which the system calls operate. The which argument determines how who is interpreted, and has one of the following values:
ioprio_get () returns the ioprio value of the process with highest I/O priority of any of the processes that match the criteria specified in which and who . On error, -1 is returned, and errno is set to indicate the error. On success, ioprio_set () returns 0. On error, -1 is returned, and errno is set to indicate the error.
kernel 2.6.13.
syscall(2) . These system calls only have an effect when used in conjunction with an I/O scheduler that supports I/O priorities. As at kernel 2.6.17 the only such scheduler is the Completely Fair Queuing (CFQ) I/O scheduler. "Selecting an I/O Scheduler" I/O Schedulers are selected on a per-device basis via the special file /sys/block/<device>/queue/scheduler . One can view the current I/O scheduler via the /sys file system. For example, the following command displays a list of all schedulers currently loaded in the kernel: noop anticipatory deadline [cfq] The scheduler surrounded by brackets is the one actually in use for the device ( hda in the example). Setting another scheduler is done by writing the name of the new scheduler to this file. For example, the following command will set the scheduler for the hda device to cfq : Password: Since v3 (aka CFQ Time Sliced) CFQ implements I/O nice levels similar to those of CPU scheduling. These nice levels are grouped in three scheduling classes each one containing one or more priority levels: Glibc does not yet provide a suitable header file defining the function prototypes and macros described on this page. Suitable definitions can be found in linux/ioprio.h .
open(2) , capabilities(7) Documentation/block/ioprio.txt in the kernel source tree.
man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. | |||||
|
| |||||