Re: Power management stuff
From: Matthew Garrett
Date: Sat Sep 06 2008 - 17:40:22 EST
On Sat, Sep 06, 2008 at 11:19:46PM +0300, Cristi Magherusan wrote:
> 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.
> 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.
> 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.
> 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.
--
Matthew Garrett | mjg59@xxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/