On 04/28/20 10:43, Randy Dunlap wrote: > Hi-- > > I have a few corrections for you below:
Thanks Randy. I applied all your suggestions for the next version. Thanks -- Qais Yousef > > On 4/28/20 9:41 AM, Qais Yousef wrote: > > 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]> > > CC: Jonathan Corbet <[email protected]> > > CC: Juri Lelli <[email protected]> > > CC: Vincent Guittot <[email protected]> > > CC: Dietmar Eggemann <[email protected]> > > CC: Steven Rostedt <[email protected]> > > CC: Ben Segall <[email protected]> > > CC: Mel Gorman <[email protected]> > > CC: Luis Chamberlain <[email protected]> > > CC: Kees Cook <[email protected]> > > CC: Iurii Zaikin <[email protected]> > > CC: Quentin Perret <[email protected]> > > CC: Valentin Schneider <[email protected]> > > CC: Patrick Bellasi <[email protected]> > > CC: Pavan Kondeti <[email protected]> > > CC: [email protected] > > CC: [email protected] > > CC: [email protected] > > --- > > Documentation/admin-guide/sysctl/kernel.rst | 48 +++++++++++++++++++++ > > 1 file changed, 48 insertions(+) > > > > diff --git a/Documentation/admin-guide/sysctl/kernel.rst > > b/Documentation/admin-guide/sysctl/kernel.rst > > index 0d427fd10941..e7255f71493c 100644 > > --- a/Documentation/admin-guide/sysctl/kernel.rst > > +++ b/Documentation/admin-guide/sysctl/kernel.rst > > @@ -940,6 +940,54 @@ Enables/disables scheduler statistics. Enabling this > > feature > > incurs a small amount of overhead in the scheduler but is > > useful for debugging and performance tuning. > > > > +sched_util_clamp_min: > > +===================== > > + > > +Max allowed *minimum* utilization. > > + > > +Default value is SCHED_CAPACITY_SCALE (1024), which is the maximum possible > > +value. > > + > > +It means that any requested uclamp.min value cannot be greater than > > +sched_util_clamp_min, ie: it is restricted to the range > > i.e., it is > > > +[0:sched_util_clamp_min]. > > + > > +sched_util_clamp_max: > > +===================== > > + > > +Max allowed *maximum* utilization. > > + > > +Default value is SCHED_CAPACITY_SCALE (1024), which is the maximum possible > > +value. > > + > > +It means that any requested uclamp.max value cannot be greater than > > +sched_util_clamp_max, ie: it is restricted to the range > > i.e., it is > > > +[0:sched_util_clamp_max]. > > + > > +sched_util_clamp_min_rt_default: > > +================================ > > + > > +By default Linux is tuned for performance. Which means that RT tasks > > always run > > +at the highest frequency and most capable (highest capacity) CPU (in > > +heterogeneous systems). > > + > > +Uclamp achieves this by setting the requested uclamp.min of all RT tasks to > > +SCHED_CAPACITY_SCALE (1024) by default. Which effectively boosts the tasks > > to > > by default, which > > > +run at the highest frequency and bias them to run on the biggest CPU. > > biases them > > > + > > +This knob allows admins to change the default behavior when uclamp is being > > +used. In battery powered devices particularly, running at the maximum > > +capacity and frequency will increase energy consumption and shorten the > > battery > > +life. > > + > > +This knob is only effective for RT tasks which the user hasn't modified > > their > > +requested uclamp.min value via sched_setattr() syscall. > > + > > +This knob will not escape the constraint imposed by sched_util_clamp_min > > +defined above. > > + > > +Any modification is applied lazily on the next opportunity the scheduler > > needs > > +to calculate the effective value of uclamp.min of the task. > > > > seccomp > > ======= > > > > thanks. > -- > ~Randy >

