Skip to content

Commit 1f73d1a

Browse files
Qais YousefPeter Zijlstra
authored andcommitted
Documentation/sysctl: Document uclamp sysctl knobs
Uclamp exposes 3 sysctl knobs: * sched_util_clamp_min * sched_util_clamp_max * sched_util_clamp_min_rt_default Document them in sysctl/kernel.rst. Signed-off-by: Qais Yousef <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 13685c4 commit 1f73d1a

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

Documentation/admin-guide/sysctl/kernel.rst

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,6 +1062,60 @@ Enables/disables scheduler statistics. Enabling this feature
10621062
incurs a small amount of overhead in the scheduler but is
10631063
useful for debugging and performance tuning.
10641064

1065+
sched_util_clamp_min:
1066+
=====================
1067+
1068+
Max allowed *minimum* utilization.
1069+
1070+
Default value is 1024, which is the maximum possible value.
1071+
1072+
It means that any requested uclamp.min value cannot be greater than
1073+
sched_util_clamp_min, i.e., it is restricted to the range
1074+
[0:sched_util_clamp_min].
1075+
1076+
sched_util_clamp_max:
1077+
=====================
1078+
1079+
Max allowed *maximum* utilization.
1080+
1081+
Default value is 1024, which is the maximum possible value.
1082+
1083+
It means that any requested uclamp.max value cannot be greater than
1084+
sched_util_clamp_max, i.e., it is restricted to the range
1085+
[0:sched_util_clamp_max].
1086+
1087+
sched_util_clamp_min_rt_default:
1088+
================================
1089+
1090+
By default Linux is tuned for performance. Which means that RT tasks always run
1091+
at the highest frequency and most capable (highest capacity) CPU (in
1092+
heterogeneous systems).
1093+
1094+
Uclamp achieves this by setting the requested uclamp.min of all RT tasks to
1095+
1024 by default, which effectively boosts the tasks to run at the highest
1096+
frequency and biases them to run on the biggest CPU.
1097+
1098+
This knob allows admins to change the default behavior when uclamp is being
1099+
used. In battery powered devices particularly, running at the maximum
1100+
capacity and frequency will increase energy consumption and shorten the battery
1101+
life.
1102+
1103+
This knob is only effective for RT tasks which the user hasn't modified their
1104+
requested uclamp.min value via sched_setattr() syscall.
1105+
1106+
This knob will not escape the range constraint imposed by sched_util_clamp_min
1107+
defined above.
1108+
1109+
For example if
1110+
1111+
sched_util_clamp_min_rt_default = 800
1112+
sched_util_clamp_min = 600
1113+
1114+
Then the boost will be clamped to 600 because 800 is outside of the permissible
1115+
range of [0:600]. This could happen for instance if a powersave mode will
1116+
restrict all boosts temporarily by modifying sched_util_clamp_min. As soon as
1117+
this restriction is lifted, the requested sched_util_clamp_min_rt_default
1118+
will take effect.
10651119

10661120
seccomp
10671121
=======

0 commit comments

Comments
 (0)