tparys Posted June 19, 2021 Share Posted June 19, 2021 Ever since I read through THIS POST a while back, I started digging through the cpufrequtils init script, and was a more or less disappointed with what I found. It's largely a product of the CPUs that were available around that time (eg - Pentium 3). Namely that all cores in the system are the same, and there's should be only one master policy that controls everything. Of course ARM big.LITTLE totally breaks these assumptions, and leaves the script with no viable way to specify different schedulers or frequency ranges for each CPU cluster. It still runs, but not really correctly. For example, you can't set the RK3399 little cores above 1.4 GHz, but that's basically what it attempts to do on every boot. Also it needs use "cpufreq-set" to do it's job, which seems too hard when the sysfs interface is already pretty simple. Really, that extra complexity isn't buying you a single thing. Maybe it made more sense 10-15 years ago. So I took a crack at doing a far simpler, stupid version of that script (on perhaps smarter depending on perspective). It can generate it's own config, and I think that it comes across much more readable and accessible. ### # CPUFreq policy for CPUs: 0 1 2 3 # # CPU Frequency Governor # Avail: conservative ondemand userspace powersave performance schedutil POLICY0_GOVERNOR=ondemand # Min/Max Frequency Selection # Avail: 408000 600000 816000 1008000 1200000 1416000 POLICY0_MIN_FREQ=408000 POLICY0_MAX_FREQ=1416000 ### # CPUFreq policy for CPUs: 4 5 # # CPU Frequency Governor # Avail: conservative ondemand userspace powersave performance schedutil POLICY4_GOVERNOR=conservative # Min/Max Frequency Selection # Avail: 408000 600000 816000 1008000 1200000 1416000 1608000 1800000 POLICY4_MIN_FREQ=408000 POLICY4_MAX_FREQ=1800000 And using it isn't too hard ... cp cpufrequtils-bl /etc/init.d/ sudo /etc/init.d/cpufrequtils-bl save sudo vi /etc/default/cpufrequtils-bl sudo systemctl disable cpufrequtils sudo systemctl enable cpufrequtils-bl I know that this is probably pretty far down on the list of priorities, but does anyone thing that this would be useful to others? cpufrequtils-bl 4 Quote Link to comment Share on other sites More sharing options...
NicoD Posted June 19, 2021 Share Posted June 19, 2021 Feel free to try to add it to armbian-config. https://github.com/armbian/config The script is indeed dated. And no devs have time to work on it. I've always manually set it up in /etc/rc.local. 1 Quote Link to comment Share on other sites More sharing options...
tparys Posted June 20, 2021 Author Share Posted June 20, 2021 Adding to armbian-config is certainly a possibility, but as the tool is pending a massive rewrite, and the desired tool for the redesign (Ansible) is not in my bag o tricks, I'll probably hold off on doing that. I almost feel like it might fit better in the Armbian BSP generated from the build system, but am open to opinions. 0 Quote Link to comment Share on other sites More sharing options...
Fisherworks Posted May 13, 2023 Share Posted May 13, 2023 Your script is tested on my Tinker Board 2s and it's proved to be effective to setup the correct MAX and MIN for that (instead of that a little aggressive settings by the official armbian image), especially for the hardware with only passive cooling that is placed into a wiring box. And it should be considered to share over github or somewhere since other guys might need this too. Thanks anyway, sir. 0 Quote Link to comment Share on other sites More sharing options...
Jens J. Posted July 14, 2023 Share Posted July 14, 2023 also works great on Amlogic S912 would also love to see this somehow get included 0 Quote Link to comment Share on other sites More sharing options...
Jens J. Posted July 14, 2023 Share Posted July 14, 2023 also with big.LITTLE this article seems to imply that the correct policy is `schedutil`, but I guess that's ultimately up to the admin https://www.phoronix.com/news/Linux-5.9-Power-Management 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.