]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
sched.7: Clarify details of autogroup nice value
authorMichael Kerrisk <mtk.manpages@gmail.com>
Sun, 27 Nov 2016 21:45:22 +0000 (22:45 +0100)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Wed, 30 Nov 2016 17:30:36 +0000 (18:30 +0100)
Also clarify its interactions with the thread nice value.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man7/sched.7

index 70c30adbd0acaf7fd3de3110e45048720ff815f8..9b06ed6934c5f7b7f016301335c9f8fd35e344a3 100644 (file)
@@ -813,10 +813,6 @@ The allowed range is from +19 (low priority) to \-20 (high priority).
 .BR write (2)
 to fail with the error
 .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 .
 .\" Because of a bug introduced in Linux 4.7
 .\" (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
 .\" ("sched/autogroup: Fix 64bit kernel nice adjustment";
 .\" check later to see in which kernel version it lands.
-.\"
-.\" FIXME How do the nice value of a process and the nice value of
-.\" an autogroup interact? Which has priority?
-.\"
-.\" It *appears* that the autogroup nice value is used for CPU distribution
-.\" between task groups, and that the process nice value has no effect there.
-.\" (I.e., suppose two autogroups each contain a CPU-bound process,
-.\" with one process having nice==0 and the other having nice==19.
-.\" It appears that they each get 50% of the CPU.)
-.\" 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 autogroup nice setting has the same meaning as the process nice value,
+but applies to distribution of CPU cycles to the autogroup as a whole,
+based on the relative nice values of other autogroups.
+For a process inside an autogroup, the CPU cycles that it receives
+will be a product of the autogroup's nice value
+(compared to other autogroups)
+and the process's nice value
+(compared to other processes in the same autogroup.
 
 The use of the
 .BR cgroups (7)
 CPU controller to place processes in cgroups other than the
 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
 non-real-time policies
 .RB ( SCHED_OTHER ,