Cpuinfo_cur_freq


#1

Hi all,

when i check the cpu freq inside /sys/devices/system/cpu/cpuX/cpufreq/cpuinfo_cur_freq, the returned value is 200000.
It is weird because the CPU freq of 410c is about 1.2GHz into the docs.
Do you think the CPU freq is really at 200MHz or the 1 has been omitted?
thanks


#2

Hi @francois

200MHz is probably correct. The CPUs dynamically change operating frequency depending on the work load. If you have no workload under Debian they throttle back to 200MHz. Under Android they can be fully powered down (no DC power) to 0Hz. Each CPU can run at any speed step, so even if one CPU is running at full speed the rest could be at minimal speed, or powered off. The hint is in the name of the file you read: cpuinfo_cur_freq.


#3

thanks ljking,

yes the frequency is dynamic. I have obtained 1209600 during openssl speed command.
thanks!


#4

A couple of additional notes:

  • you can hotplug the CPUs with Debian/Linux/OE as well, see https://www.kernel.org/doc/Documentation/cpu-hotplug.txt. In the QC Android builds, there is a (proprietary) user space daemon that will automatically hotcplug CPUs when unused.
  • the default cpufreq governor in the Linux release is ‘ondemand’ which as noted above will adjust CPU frequencies based on actual run time load (e.g. from 200Mhz to 1.2Ghz on DB410c). you can force all CPUs to at the lowest or highest speed using powersave or performance governors, e.g.
cpufreq-set -g performance 
cpufreq-set -g powersave

Or even pick a specific frequency , if needed.