Asciidoc: Review schedutils man pages

This commit is contained in:
Mario Blättermann 2021-03-23 20:43:52 +01:00
parent 925a9b5d72
commit 5a52459e0f
4 changed files with 102 additions and 88 deletions

View File

@ -29,6 +29,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
:man source: util-linux {release-version}
:page-layout: base
:command: chrt
:colon: :
== NAME
@ -47,80 +48,79 @@ chrt - manipulate the real-time attributes of a process
== POLICIES
*-o*, *--other*::
Set scheduling policy to *SCHED_OTHER* (time-sharing scheduling). This is the default Linux scheduling policy.
Set scheduling policy to *SCHED_OTHER* (time-sharing scheduling). This is the default Linux scheduling policy.
*-f*, *--fifo*::
Set scheduling policy to *SCHED_FIFO* (first in-first out).
Set scheduling policy to *SCHED_FIFO* (first in-first out).
*-r*, *--rr*::
Set scheduling policy to *SCHED_RR* (round-robin scheduling). When no policy is defined, the *SCHED_RR* is used as the default.
Set scheduling policy to *SCHED_RR* (round-robin scheduling). When no policy is defined, the *SCHED_RR* is used as the default.
*-b*, *--batch*::
Set scheduling policy to *SCHED_BATCH* (scheduling batch processes). Linux-specific, supported since 2.6.16. The priority argument has to be set to zero.
Set scheduling policy to *SCHED_BATCH* (scheduling batch processes). Linux-specific, supported since 2.6.16. The priority argument has to be set to zero.
*-i*, *--idle*::
Set scheduling policy to *SCHED_IDLE* (scheduling very low priority jobs). Linux-specific, supported since 2.6.23. The priority argument has to be set to zero.
Set scheduling policy to *SCHED_IDLE* (scheduling very low priority jobs). Linux-specific, supported since 2.6.23. The priority argument has to be set to zero.
*-d*, *--deadline*::
Set scheduling policy to *SCHED_DEADLINE* (sporadic task model deadline scheduling). Linux-specific, supported since 3.14. The priority argument has to be set to zero. See also *--sched-runtime*, *--sched-deadline* and *--sched-period*. The relation between the options required by the kernel is
runtime <= deadline <= period. *chrt* copies _period_ to _deadline_ if *--sched-deadline* is not specified and _deadline_ to _runtime_ if *--sched-runtime* is not specified. It means that at least *--sched-period* has to be specified. See *sched*(7) for more details.
Set scheduling policy to *SCHED_DEADLINE* (sporadic task model deadline scheduling). Linux-specific, supported since 3.14. The priority argument has to be set to zero. See also *--sched-runtime*, *--sched-deadline* and *--sched-period*. The relation between the options required by the kernel is runtime <= deadline <= period. *chrt* copies _period_ to _deadline_ if *--sched-deadline* is not specified and _deadline_ to _runtime_ if *--sched-runtime* is not specified. It means that at least *--sched-period* has to be specified. See *sched*(7) for more details.
== SCHEDULING OPTIONS
*-T*, *--sched-runtime* _nanoseconds_::
Specifies runtime parameter for *SCHED_DEADLINE* policy (Linux-specific).
Specifies runtime parameter for *SCHED_DEADLINE* policy (Linux-specific).
*-P*, *--sched-period* _nanoseconds_::
Specifies period parameter for *SCHED_DEADLINE* policy (Linux-specific).
Specifies period parameter for *SCHED_DEADLINE* policy (Linux-specific).
*-D*, *--sched-deadline* _nanoseconds_::
Specifies deadline parameter for *SCHED_DEADLINE* policy (Linux-specific).
Specifies deadline parameter for *SCHED_DEADLINE* policy (Linux-specific).
*-R*, *--reset-on-fork*::
Use *SCHED_RESET_ON_FORK* or *SCHED_FLAG_RESET_ON_FORK* flag. Linux-specific,
supported since 2.6.31.
Use *SCHED_RESET_ON_FORK* or *SCHED_FLAG_RESET_ON_FORK* flag. Linux-specific, supported since 2.6.31.
Each thread has a _reset-on-fork_ scheduling flag. When this flag is set, children created by *fork*(2) do not inherit privileged scheduling policies. After the _reset-on-fork_ flag has been enabled, it can be reset only if the thread has the *CAP_SYS_NICE* capability. This flag is disabled in child processes created by *fork*(2).
More precisely, if the _reset-on-fork_ flag is set, the following rules apply for subsequently created children:
* If the calling thread has a scheduling policy of *SCHED_FIFO* or *SCHED_RR*,
the policy is reset to *SCHED_OTHER* in child processes.
* If the calling thread has a scheduling policy of *SCHED_FIFO* or *SCHED_RR*, the policy is reset to *SCHED_OTHER* in child processes.
* If the calling process has a negative nice value, the nice value is reset to
zero in child processes.
* If the calling process has a negative nice value, the nice value is reset to zero in child processes.
== OPTIONS
*-a*, *--all-tasks*::
Set or retrieve the scheduling attributes of all the tasks (threads) for a given PID.
Set or retrieve the scheduling attributes of all the tasks (threads) for a given PID.
*-m*, *--max*::
Show minimum and maximum valid priorities, then exit.
Show minimum and maximum valid priorities, then exit.
*-p*, *--pid*::
Operate on an existing PID and do not launch a new task.
Operate on an existing PID and do not launch a new task.
*-v*, *--verbose*::
Show status information.
Show status information.
*-V*, *--version*::
Display version information and exit.
Display version information and exit.
*-h*, *--help*::
Display help text and exit.
Display help text and exit.
== USAGE
The default behavior is to run a new command:::
//TRANSLATORS: Keep {colon} untranslated
The default behavior is to run a new command{colon}::
*chrt* _priority_ _command_ [_arguments_]
You can also retrieve the real-time attributes of an existing task:::
//TRANSLATORS: Keep {colon} untranslated
You can also retrieve the real-time attributes of an existing task{colon}::
*chrt -p* _PID_
Or set them:::
//TRANSLATORS: Keep {colon} untranslated
Or set them{colon}::
*chrt -r -p* _priority PID_
@ -136,7 +136,7 @@ Linux' default scheduling policy is *SCHED_OTHER*.
== AUTHORS
mailto:rml@tech9.net[Robert Love] +
mailto:rml@tech9.net[Robert Love],
mailto:kzak@redhat.com[Karel Zak]
== SEE ALSO

View File

@ -5,6 +5,7 @@
:man source: util-linux {release-version}
:page-layout: base
:command: ionice
:plus: +
== NAME
@ -29,43 +30,44 @@ When _command_ is given, *ionice* will run this command with the given arguments
As of this writing, a process can be in one of three scheduling classes:
*Idle*::
A program running with idle I/O priority will only get disk time when no other program has asked for disk I/O for a defined grace period. The impact of an idle I/O process on normal system activity should be zero. This scheduling class does not take a priority argument. Presently, this scheduling class is permitted for an ordinary user (since kernel 2.6.25).
A program running with idle I/O priority will only get disk time when no other program has asked for disk I/O for a defined grace period. The impact of an idle I/O process on normal system activity should be zero. This scheduling class does not take a priority argument. Presently, this scheduling class is permitted for an ordinary user (since kernel 2.6.25).
*Best-effort*::
This is the effective scheduling class for any process that has not asked for a specific I/O priority. This class takes a priority argument from _0-7_, with a lower number being higher priority. Programs running at the same best-effort priority are served in a round-robin fashion. +
{nbsp} +
Note that before kernel 2.6.26 a process that has not asked for an I/O priority formally uses "*none*" as scheduling class, but the I/O scheduler will treat such processes as if it were in the best-effort class. The priority within the best-effort class will be dynamically derived from the CPU nice level of the process: io_priority = (cpu_nice + 20) / 5. +
{nbsp} +
For kernels after 2.6.26 with the CFQ I/O scheduler, a process that has not asked for an I/O priority inherits its CPU scheduling class. The I/O priority is derived from the CPU nice level of the process (same as before kernel 2.6.26).
This is the effective scheduling class for any process that has not asked for a specific I/O priority. This class takes a priority argument from _0-7_, with a lower number being higher priority. Programs running at the same best-effort priority are served in a round-robin fashion.
+
Note that before kernel 2.6.26 a process that has not asked for an I/O priority formally uses "*none*" as scheduling class, but the I/O scheduler will treat such processes as if it were in the best-effort class. The priority within the best-effort class will be dynamically derived from the CPU nice level of the process: io_priority = (cpu_nice {plus} 20) / 5.
//TRANSLATORS: Keep {plus} untranslated.
+
For kernels after 2.6.26 with the CFQ I/O scheduler, a process that has not asked for an I/O priority inherits its CPU scheduling class. The I/O priority is derived from the CPU nice level of the process (same as before kernel 2.6.26).
*Realtime*::
The RT scheduling class is given first access to the disk, regardless of what else is going on in the system. Thus the RT class needs to be used with some care, as it can starve other processes. As with the best-effort class, 8 priority levels are defined denoting how big a time slice a given process will receive on each scheduling window. This scheduling class is not permitted for an ordinary (i.e., non-root) user.
The RT scheduling class is given first access to the disk, regardless of what else is going on in the system. Thus the RT class needs to be used with some care, as it can starve other processes. As with the best-effort class, 8 priority levels are defined denoting how big a time slice a given process will receive on each scheduling window. This scheduling class is not permitted for an ordinary (i.e., non-root) user.
== OPTIONS
*-c*, *--class* _class_::
Specify the name or number of the scheduling class to use; `0` for none, `1` for realtime, `2` for best-effort, `3` for idle.
Specify the name or number of the scheduling class to use; `0` for none, `1` for realtime, `2` for best-effort, `3` for idle.
*-n*, *--classdata* _level_::
Specify the scheduling class data. This only has an effect if the class accepts an argument. For realtime and best-effort, _0-7_ are valid data (priority levels), and `0` represents the highest priority level.
Specify the scheduling class data. This only has an effect if the class accepts an argument. For realtime and best-effort, _0-7_ are valid data (priority levels), and `0` represents the highest priority level.
*-p*, *--pid* _PID_...::
Specify the process IDs of running processes for which to get or set the scheduling parameters.
Specify the process IDs of running processes for which to get or set the scheduling parameters.
*-P*, *--pgid* _PGID_...::
Specify the process group IDs of running processes for which to get or set the scheduling parameters.
Specify the process group IDs of running processes for which to get or set the scheduling parameters.
*-t*, *--ignore*::
Ignore failure to set the requested priority. If _command_ was specified, run it even in case it was not possible to set the desired scheduling priority, which can happen due to insufficient privileges or an old kernel version.
Ignore failure to set the requested priority. If _command_ was specified, run it even in case it was not possible to set the desired scheduling priority, which can happen due to insufficient privileges or an old kernel version.
*-h*, *--help*::
Display help text and exit.
Display help text and exit.
*-u*, *--uid* _UID_...::
Specify the user IDs of running processes for which to get or set the scheduling parameters.
Specify the user IDs of running processes for which to get or set the scheduling parameters.
*-V*, *--version*::
Display version information and exit.
Display version information and exit.
== NOTES
@ -73,18 +75,21 @@ Linux supports I/O scheduling priorities and classes since 2.6.13 with the CFQ I
== EXAMPLES
* # *ionice* -c 3 -p 89 +
* # *ionice* -c 3 -p 89
Sets process with PID 89 as an idle I/O process.
* # *ionice* -c 2 -n 0 bash +
* # *ionice* -c 2 -n 0 bash
Runs 'bash' as a best-effort program with highest priority.
* # *ionice* -p 89 91 +
* # *ionice* -p 89 91
Prints the class and priority of the processes with PID 89 and 91.
== AUTHORS
mailto:jens@axboe.dk[Jens Axboe] +
mailto:jens@axboe.dk[Jens Axboe],
mailto:kzak@redhat.com[Karel Zak]
== SEE ALSO

View File

@ -27,6 +27,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
:man source: util-linux {release-version}
:page-layout: base
:command: taskset
:colon: :
:copyright: ©
== NAME
@ -44,55 +46,56 @@ The *taskset* command is used to set or retrieve the CPU affinity of a running p
The CPU affinity is represented as a bitmask, with the lowest order bit corresponding to the first logical CPU and the highest order bit corresponding to the last logical CPU. Not all CPUs may exist on a given system but a mask may specify more CPUs than are present. A retrieved mask will reflect only the bits that correspond to CPUs physically on the system. If an invalid mask is given (i.e., one that corresponds to no valid CPUs on the current system) an error is returned. The masks may be specified in hexadecimal (with or without a leading "0x"), or as a CPU list with the *--cpu-list* option. For example,
____
*0x00000001*::
is processor #0,
is processor #0,
*0x00000003*::
is processors #0 and #1,
is processors #0 and #1,
*0xFFFFFFFF*::
is processors #0 through #31,
is processors #0 through #31,
*32*::
is processors #1, #4, and #5,
is processors #1, #4, and #5,
*--cpu-list 0-2,6*::
is processors #0, #1, #2, and #6.
is processors #0, #1, #2, and #6.
*--cpu-list 0-10:2*::
is processors #0, #2, #4, #6, #8 and #10. The suffix ":N" specifies stride in the range, for example 0-10:3 is interpreted as 0,3,6,9 list.
____
is processors #0, #2, #4, #6, #8 and #10. The suffix ":N" specifies stride in the range, for example 0-10:3 is interpreted as 0,3,6,9 list.
When *taskset* returns, it is guaranteed that the given program has been scheduled to a legal CPU.
== OPTIONS
*-a*, *--all-tasks*::
Set or retrieve the CPU affinity of all the tasks (threads) for a given PID.
Set or retrieve the CPU affinity of all the tasks (threads) for a given PID.
*-c*, *--cpu-list*::
Interpret _mask_ as numerical list of processors instead of a bitmask. Numbers are separated by commas and may include ranges. For example: *0,5,8-11*.
Interpret _mask_ as numerical list of processors instead of a bitmask. Numbers are separated by commas and may include ranges. For example: *0,5,8-11*.
*-p*, *--pid*::
Operate on an existing PID and do not launch a new task.
Operate on an existing PID and do not launch a new task.
*-V*, *--version*::
Display version information and exit.
Display version information and exit.
*-h*, *--help*::
Display help text and exit.
Display help text and exit.
== USAGE
The default behavior is to run a new command with a given affinity mask:::
*taskset* _mask_ _command_ [_arguments_]
//TRANSLATORS: Keep {colon} untranslated.
The default behavior is to run a new command with a given affinity mask{colon}::
*taskset* _mask_ _command_ [_arguments_]
You can also retrieve the CPU affinity of an existing task:::
*taskset -p* _pid_
//TRANSLATORS: Keep {colon} untranslated.
You can also retrieve the CPU affinity of an existing task{colon}::
*taskset -p* _pid_
Or set it:::
*taskset -p* _mask pid_
//TRANSLATORS: Keep {colon} untranslated.
Or set it{colon}::
*taskset -p* _mask pid_
== PERMISSIONS
@ -104,7 +107,8 @@ Written by Robert M. Love.
== COPYRIGHT
Copyright © 2004 Robert M. Love. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//TRANSLATORS: Keep {copyright} untranslated.
Copyright {copyright} 2004 Robert M. Love. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
== SEE ALSO

View File

@ -49,58 +49,62 @@ Utilization clamping is a new feature added in v5.3. It gives a hint to the sche
The utilization of the task affects frequency selection and task placement. Only schedutil cpufreq governor understands handling util clamp hints at the time of writing. Consult your kernel docs for further info about other cpufreq governors support.
If you're running on asymmetric heterogeneous system like Arm's big.LITTLE. Utilization clamping can help bias task placement. If the task is boosted such that *util_min* value is higher than the little cores' capacity, then the scheduler will do its best to place it on a big core.
If you're running on asymmetric heterogeneous system like Arm's big.LITTLE. Utilization clamping can help bias task placement. If the task is boosted such that _util_min_ value is higher than the little cores' capacity, then the scheduler will do its best to place it on a big core.
Similarly, if *util_max* is smaller than or equal the capacity of the little cores, then the scheduler can still choose to place it there even if the actual utilization of the task is at max.
Similarly, if _util_max_ is smaller than or equal the capacity of the little cores, then the scheduler can still choose to place it there even if the actual utilization of the task is at max.
Setting a task's *uclamp_min* to a none zero value will effectively boost the task as when it runs it'll always start from this utilization value.
Setting a task's _uclamp_min_ to a none zero value will effectively boost the task as when it runs it'll always start from this utilization value.
By setting a task's *uclamp_max* below 1024, this will effectively cap the task as when it runs it'll never be able to go above this utilization value.
By setting a task's _uclamp_max_ below 1024, this will effectively cap the task as when it runs it'll never be able to go above this utilization value.
The full utilization range is: [0:1024]. The special value -1 is used to reset to system's default.
== OPTIONS
*-m*::
Set _util_min_ value.
Set _util_min_ value.
*-M*::
Set _util_max_ value.
Set _util_max_ value.
*-a*, *--all-tasks*::
Set or retrieve the utilization clamping attributes of all the tasks (threads) for a given PID.
Set or retrieve the utilization clamping attributes of all the tasks (threads) for a given PID.
*-p*, *--pid*::
Operate on an existing PID and do not launch a new task.
Operate on an existing PID and do not launch a new task.
*-s*, *--system*::
Set or retrieve the system-wide utilization clamping attributes.
Set or retrieve the system-wide utilization clamping attributes.
*-R*, *--reset-on-fork*::
Set *SCHED_FLAG_RESET_ON_FORK* flag
Set *SCHED_FLAG_RESET_ON_FORK* flag.
*-v*, *--verbose*::
Show status information.
Show status information.
*-V*, *--version*::
Display version information and exit.
Display version information and exit.
*-h*, *--help*::
Display help text and exit.
Display help text and exit.
== USAGE
The default behavior is to run a new command:::
*uclampset* _[-m uclamp_min]_ _[-M uclamp_max]_ _command_ [_arguments_]
//TRANSLATORS: Keep {colon} untranslated.
The default behavior is to run a new command{colon}::
*uclampset* _[-m uclamp_min]_ _[-M uclamp_max]_ _command_ [_arguments_]
You can also retrieve the utilization clamping attributes of an existing task:::
*uclampset -p* _PID_
//TRANSLATORS: Keep {colon} untranslated.
You can also retrieve the utilization clamping attributes of an existing task{colon}::
*uclampset -p* _PID_
Or set them:::
*uclampset -p* _PID_ _[-m uclamp_min]_ _[-M uclamp_max]_
//TRANSLATORS: Keep {colon} untranslated.
Or set them{colon}::
*uclampset -p* _PID_ _[-m uclamp_min]_ _[-M uclamp_max]_
Or control the system-wide attributes:::
*uclampset -s* _[-m uclamp_min]_ _[-M uclamp_max]_
//TRANSLATORS: Keep {colon} untranslated.
Or control the system-wide attributes{colon}::
*uclampset -s* _[-m uclamp_min]_ _[-M uclamp_max]_
== PERMISSIONS
@ -110,8 +114,9 @@ A user must possess *CAP_SYS_NICE* to change the scheduling attributes of a proc
The system wide utilization clamp attributes are there to control the _allowed_ range the tasks can use. By default both _uclamp_min_ and _uclamp_max_ are set to 1024. This means users can set the utilization clamp values for their task across the full range [0:1024].
For example:::
*uclampset -s* `-m 512` `-M 700`
//TRANSLATORS: Keep {colon} untranslated.
For example{colon}::
*uclampset -s* `-m 512` `-M 700`
will prevent any task from being boosted higher than 512. And all tasks in the systems are capped to a utilization of 700. Effectively rendering the maximum performance of the system to 700.