sched.7: Clarify details of autogroup nice value

Also clarify its interactions with the thread nice value.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2016-11-27 22:45:22 +01:00
parent c49631b7de
commit 7ef1473742
1 changed files with 9 additions and 23 deletions

View File

@ -813,10 +813,6 @@ The allowed range is from +19 (low priority) to \-20 (high priority).
.BR write (2) .BR write (2)
to fail with the error to fail with the error
.BR EINVAL .) .BR EINVAL .)
The setting has the same effect as modifying the nice level via
.BR getpriority (2).
(For a discussion of the nice value, see
.BR getpriority (2).)
.\" FIXME . .\" FIXME .
.\" Because of a bug introduced in Linux 4.7 .\" Because of a bug introduced in Linux 4.7
.\" (commit 2159197d66770ec01f75c93fb11dc66df81fd45b made changes .\" (commit 2159197d66770ec01f75c93fb11dc66df81fd45b made changes
@ -829,31 +825,21 @@ The setting has the same effect as modifying the nice level via
.\" A patch was posted on 23 Nov 2016 .\" A patch was posted on 23 Nov 2016
.\" ("sched/autogroup: Fix 64bit kernel nice adjustment"; .\" ("sched/autogroup: Fix 64bit kernel nice adjustment";
.\" check later to see in which kernel version it lands. .\" check later to see in which kernel version it lands.
.\"
.\" FIXME How do the nice value of a process and the nice value of The autogroup nice setting has the same meaning as the process nice value,
.\" an autogroup interact? Which has priority? but applies to distribution of CPU cycles to the autogroup as a whole,
.\" based on the relative nice values of other autogroups.
.\" It *appears* that the autogroup nice value is used for CPU distribution For a process inside an autogroup, the CPU cycles that it receives
.\" between task groups, and that the process nice value has no effect there. will be a product of the autogroup's nice value
.\" (I.e., suppose two autogroups each contain a CPU-bound process, (compared to other autogroups)
.\" with one process having nice==0 and the other having nice==19. and the process's nice value
.\" It appears that they each get 50% of the CPU.) (compared to other processes in the same autogroup.
.\" It appears that the process nice value has effect only with respect to
.\" scheduling relative to other processes in the *same* autogroup.
.\" Is this correct?
The use of the The use of the
.BR cgroups (7) .BR cgroups (7)
CPU controller to place processes in cgroups other than the CPU controller to place processes in cgroups other than the
root CPU cgroup overrides the effect of autogrouping. root CPU cgroup overrides the effect of autogrouping.
In a nonroot autogroup,
the effect of autogroup nice value and the process nice value are additive
Autogroup nice level affects SCHED_OTHER, SCHED_BATCH, and SCHED_IDLE, but
not RT policies.
The autogroup feature groups only processes scheduled under The autogroup feature groups only processes scheduled under
non-real-time policies non-real-time policies
.RB ( SCHED_OTHER , .RB ( SCHED_OTHER ,