> is there an API or syscall to get a list of available cpu frequencies,
> that the CPU supports? 

No.

Not all rate/power adjustments are done in terms of frequencies.  Some
are done based on bus clock adjustment, or how the memory controller
works, or other tricks that are processor specific.

Mapping those into a set of sequential numbers would be hard.  The
relationships of those numbers do not translate into performance values
for all workloads evenly.

We punted on that crazy problem and instead only supply a knob
choosing 0-100 percentage scale in the hw.setperf sysctl; different
machines then pick different methods of speed adjustment at different
points on the line, and if it is convenient for them they also report
the cpu clock rate in hw.cpuspeed (however as I have said, this value
is not the final story).

Reply via email to