powerd and multicore
gavin at FreeBSD.org
Wed Sep 3 19:42:31 UTC 2008
On Mon, 1 Sep 2008, David Naylor wrote:
> The way I understand powerd works by default is that it monitors the CPU usage
> (or idleness) and changes the CPU frequency accordingly. The default values
> are >95% idle => decrease frequency; <65% idle => increase frequency.
> The problem arises when you have a system with 4 or more 'cores'. In this
> case the first CPU can be running flat out but still report an overall
> idleness of 75% and thus the frequency is not increased even though the first
> core could easily be stuck, at say 200 when capable of 2400.
> Should powerd be changed to look at CPU specific usage and adjust accordingly
> or scale the above defaults according to the number of CPU's.
There are a handful of PRs discussing this exact issue, and it is
something I was hoping to look into at some point. Have a search for
powerd PRs, especially http://www.freebsd.org/cgi/query-pr.cgi?pr=119589
(which contains patches). You may well also be better off discussing this
on the -acpi mailing list, which (although this is not strictly related to
ACPI) may be the best place to find people ihnterested in power
> Furthermore, currently (with core 2) all CPU's are controlled using a single
> value however (I think) it is possible to have each CPU running on a
> different frequency (and at least with some other architectures). Does
> powerd handle these cases?
I don't believe so, no. I also don't know if the kernel would be ok with
CPUs running at different speeds, even if things like timecounters work
correctly the scheduler may need to grow some more knowledge of this.
More information about the freebsd-current