Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a16e20e7 authored by Anurag Singh's avatar Anurag Singh
Browse files

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: default avatarAnurag Singh <anursing@codeaurora.org>
parent 4db175e5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment