Hacking the schedutil governor to upshift to maximum clock rate at every process dispatch.

David Kra dakra137 at gmail.com
Mon May 23 10:37:09 EDT 2022


I am considering modifying the scheduler and governor to get a jackrabbit
start whenever a process is dispatched. Before learning how to, I would
like some advice on whether to, and how much to do.

Example target environment:
Ubuntu Desktop 22.04 on i7-11800h Lenovo 5iPro laptop.

The governors (performance, interactive, schedultil) seem to dispatch each
process at moderate CPU clock rate and then maybe they ramp it up over the
course of several ticks. IMHO, the system would be more responsive if each
process or thread were dispatched at maximum clock rate, and later had its
clock rate lowered over time as necessary. "As necessary" means to maintain
power and thermal safety.

Seeking advice:
* Is there a better way to achieve the same result?
* Is this a dumb thing to do?
* Is it safe to rely on the existing code, firmware, and microcode to
handle the
 subsequent downclocking, and for my hack to only do the upclocking?

Note: Most of the lwn.net articles on the subject seem to be from 2016 ..
2018

references:
https://www.kernel.org/doc/Documentation/cpu-freq/governors.txt
https://elixir.bootlin.com/linux/latest/source/kernel/sched/cpufreq_schedutil.c
https://lore.kernel.org/all/?q=schedutil

((8-)> David A. Kra
mailto:dakra137 at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20220523/1f2f4e48/attachment.html>


More information about the Kernelnewbies mailing list