Message ID | 1637830481-21709-1-git-send-email-quic_mkshah@quicinc.com (mailing list archive) |
---|---|
Headers | show |
Series | Allow cpuidle governors to be compiled as modules | expand |
On Thu, Nov 25, 2021 at 9:55 AM Maulik Shah <quic_mkshah@quicinc.com> wrote: > > This series makes changes to allow cpuidle governors menu, ladder and teo > to compiled as modules when building with allmodconfig. What's the purpose of this?
Hi Rafael, On 11/25/2021 5:57 PM, Rafael J. Wysocki wrote: > On Thu, Nov 25, 2021 at 9:55 AM Maulik Shah <quic_mkshah@quicinc.com> wrote: >> This series makes changes to allow cpuidle governors menu, ladder and teo >> to compiled as modules when building with allmodconfig. > What's the purpose of this? There are two purposes of this series. 1. The series enables cpuidle governors to be allowed to compiled as modules. This is something similar to what cpufreq/devfreq governors do today as they can be be compiled as modules or built-in depending on the build config. 2. The series will also enable custom cpuidle governor to be able to register with cpuidle framework by using cpuidle_register_governor() API. This will be already achieved by (1) since it will export the required APIs for menu/ladder/teo governors to be compiled as module. Thanks, Maulik
On Thu, Nov 25, 2021 at 2:18 PM Maulik Shah <quic_mkshah@quicinc.com> wrote: > > Hi Rafael, > > On 11/25/2021 5:57 PM, Rafael J. Wysocki wrote: > > On Thu, Nov 25, 2021 at 9:55 AM Maulik Shah <quic_mkshah@quicinc.com> wrote: > >> This series makes changes to allow cpuidle governors menu, ladder and teo > >> to compiled as modules when building with allmodconfig. > > What's the purpose of this? > > There are two purposes of this series. > > 1. The series enables cpuidle governors to be allowed to compiled as > modules. > This is something similar to what cpufreq/devfreq governors do > today as they can be be compiled as modules or built-in depending on the > build config. Which is not the case for all of them, though, and I don't see why this would imply that making cpuidle governors modular would be useful. > 2. The series will also enable custom cpuidle governor to be able to > register with cpuidle framework by using cpuidle_register_governor() API. > This will be already achieved by (1) since it will export the > required APIs for menu/ladder/teo governors to be compiled as module. No custom cpuidle governors in the mainline, please. If you have one you want to be included, please submit it. So from the mainline perspective this series doesn't serve any useful purpose at all. Sorry about that.
Hi All, I realize that previous replies render this one useless but sending anyhow. On 2021.11.25 00:55 Maulik Shah wrote: > This series makes changes to allow cpuidle governors > menu, ladder and teo to compiled as modules when > building with allmodconfig. One current issue with governors being available as modules is that they don't appear on the available governors list unless they are loaded. Example with this patch set, all done as modules: ~$ grep . /sys/devices/system/cpu/cpuidle/* /sys/devices/system/cpu/cpuidle/current_driver:none /sys/devices/system/cpu/cpuidle/current_governor:none /sys/devices/system/cpu/cpuidle/current_governor_ro:none However, and based on my systems power consumption, some sort of idle must be running. ~$ echo teo | sudo tee /sys/devices/system/cpu/cpuidle/current_governor teo tee: /sys/devices/system/cpu/cpuidle/current_governor: Invalid argument ~$ sudo modprobe teo ~$ grep . /sys/devices/system/cpu/cpuidle/* /sys/devices/system/cpu/cpuidle/available_governors:teo /sys/devices/system/cpu/cpuidle/current_driver:none /sys/devices/system/cpu/cpuidle/current_governor:teo /sys/devices/system/cpu/cpuidle/current_governor_ro:teo By the way, for the cpufreq stuff, while governors that are actually available, but are modules, changing to them without first force loading the module works: $ grep . /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors:performance schedutil /sys/devices/system/cpu/cpu10/cpufreq/scaling_available_governors:performance schedutil ... $ echo ondemand | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor ondemand $ grep . /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors:ondemand performance schedutil /sys/devices/system/cpu/cpu10/cpufreq/scaling_available_governors:ondemand performance schedutil ... Doug