cpufreq: persistent_stats: export persistent CPU frequency data
CPU frequency statistics are lost when a CPU is put offline to save power.
Due to this behavior, there is currently no way of knowing what frequencies
a CPU ran at over the system's uptime (assuming it is hot-pluggable and was
offlined/onlined multiple times). To solve this problem, export these
statistics so that frequency residencies for all CPUs are preserved.
These statistics can be found under
/sys/devices/system/cpu/cpufreq/stats/cpuX - 'cpuX' is the CPU ID.
Following are the important nodes:
- time_in_state: reading this node would output all the frequencies the CPU
is capable of running at and the amount of time (in jiffies) it ran at
those frequencies
- reset: writing 1 to this node would reset all frequency time stats to 0
- enable: writing 0 or 1 to this node disables or enables stats collection,
respectively. By default, stats collection is enabled.
Change-Id: I225ef89f7b359f1f94386f2f9445ece9d5119768
Signed-off-by:
Anurag Singh <anursing@codeaurora.org>
Loading
Please register or sign in to comment