]> git.karo-electronics.de Git - karo-tx-linux.git/commit
acpi-cpufreq: remove unreliable device.get() code
authorLen Brown <len.brown@intel.com>
Mon, 6 Jun 2011 05:06:57 +0000 (01:06 -0400)
committerLen Brown <len.brown@intel.com>
Thu, 14 Jul 2011 02:43:02 +0000 (22:43 -0400)
commit9c02e39eb37cf955da5604a125e8d992062eb958
tree862d558703ba0aa3b4e2ea5f8c109feba042dd01
parentdc7acbb2518f250050179c8581a972df3b6a24f1
acpi-cpufreq: remove unreliable device.get() code

cpufreq offers the optional driver.get() entry point
for drivers to export instantaneous frequency in
/sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq.

25% of the acpi-cpufreq driver is involved in supporting
that optional feature, but on modern processors, it
is not reliable.

So here we delete this optional feature from acpi-cpufreq.
/sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq
will go away on acpi-cpufreq systems, but note that
/sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
will still be presnet to indicate the most recent request.

(and yes, powertop still works:-)

The most common reason that driver.get() is not reliable
is that modern processors autonomously change frequency
without OS instruction.  This means that reading
PERF_STATUS is possibly in-accurate as soon as the
instruction after it is read.

Average frequency over an interval is more useful
than instantaneous frequency on modern hardware.
acpi-cpufreq supplies average frequency via
the the driver->getavg() entry, which is what
the ondemand governor uses.

Signed-off-by: Len Brown <len.brown@intel.com>
drivers/cpufreq/acpi-cpufreq.c