Power management stuff
Hello,
I have a few ideas/questions about some power management-related issues:
1) How could we get the current frequency/voltage settings for the CPU, fr example when using SpeedStep by using the /proc filesystem?
2) It would be nice to modify a bit the CPU throttling API to be able to set a max value when using dynamic governors, like ondemand. The frequency/voltage pair should be set to the minimum allowed by construction, just like it was before, and scale up to a max value set by the user. This would allow the user set the best balance between responsiveness and power consumption that suits its needs. Also, targeting a certain temperature would be a great feature to have.
3) Is there any plan to improve the current battery framework and provide information about the estimated recharging time, as it was before. I guess the versions before 2.6.24 used to provide this but the newer versions don't do it anymore.
Thanks,
Cristi
Quoted 2 lines · Cristi Magherusan
1) How could we get the current frequency/voltage settings for the CPU, fr example when using SpeedStep by using the /proc filesystem?
The current frequency can be read from either /proc/cpuinfo or /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq . The voltage isn't exposed.
Quoted 6 lines
2) It would be nice to modify a bit the CPU throttling API to be able to set a max value when using dynamic governors, like ondemand. The frequency/voltage pair should be set to the minimum allowed by construction, just like it was before, and scale up to a max value set by the user. This would allow the user set the best balance between responsiveness and power consumption that suits its needs.
/sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq - though on x86, setting this to anything other than the maximum will result in more power consumption, not less.
Quoted 1 line
Also, targeting a certain temperature would be a great feature to have.
I've done some patches for this, but they're not currently merged.
Quoted 4 lines
3) Is there any plan to improve the current battery framework and provide information about the estimated recharging time, as it was before. I guess the versions before 2.6.24 used to provide this but the newer versions don't do it anymore.
No, you can do that in userspace. Charge time has only been exposed for apm, and that's because the BIOS gave it to us. Accurate figures are going to require learning the behaviour of the specific battery, and there's no way to do that sensibly in kernel.
Signature · 1 line
Matthew Garrett | [email protected]