I disagree with you here. for each frequency setting you can say how much
power the cpu/system is expected to use (especially as a percentage of the
full power mode). creating this value requires you to take two things into
account, the voltage you are running things at (by far the biggest
effect), and the minor difference that the frequency makes at that voltage
(possibly small enough to ignore entirely).
the API I proposed has no problem with there being multiple modes that
have the same %power but with different %capability numbers.
how do you deal with the "power at idle" vs "power at full load".. you
need both at each level to pick the best one, as well as relative
performance etc.
the fact that you want to run at the max frequancy for a given voltage is
no I want to run at the max frequency PERIOD. On just about any PC, it's
more power efficient to go full speed when executing code, and then idle
for as long as you can. (there are some second order effects that make
this a bit more complex, but as first order approach it's a sound
approach). Voltage follows, and that's fine.
this strategy should work well on the normal unpredictable workload that
most people deal with, but there are some cases where the workload becomes
pretty predictable (media players for example) where there really is less
variation, and a need for a constant availability of the cpu, so it may
actually save a smidge of power to run below the highest freq that the
voltage allows rather then running faster and being idle more cycles.
that actually is the example showcase of race-to-idle where you
absolutely want to run at the highest frequency..