I'm trying to manage the power of the Edison Atom CPU. I have never done that before, but I have read that it's possible to reduce the clock of a CPU via /sys/devices/cpu/... .
I have also read that each processor can be switched to differents performance states (P-states) or power saving states (C-states). Here I think I have understood that every processor can be switched from C0 (full performance, max clock frequency) to C3 (power saving, low clock frequency). On some specific CPU we can set the power state down to C10.
I have found that the Atom processor of the Edison can be set to C6 (or C7 I'm not sure).
However, I can't find a way to manage those modes via the linux fs of the official yocto image.
I am also a little confused about how the C-states are related to clock frequencies. Do C-states only shut down some parts in the cpu? And reducing the clocks frequencies correspond only to reducing voltage in the circuit? I mean, in C6 mode we can't reduce clock's frequency because they are off right?
So my questions are: How to manage power in user space ? How to switch cpu in different C-modes?
Could you confirm or not what I am saying?
Thank you in advance.
- Power Management
I also am very interested in this question. The default energy consumption of the Atom CPU on the Edison is pretty high and I wan't to see if I can better manage the battery life.
I did some more digging into this today to see if the Edison would respond to any typical ways of changing the CPU into different power states. Nothing I tried seemed to have much impact yet though I have concluded testing. I'll post some rough notes of what I tried for build on or share their experiences. That being said I guess none of us will get too far until we have more info from Intel that I gather they are collecting now given Diego's statement above.
So I noted when exploring the /sys/device/* file system that each core of the Atom are shown as cpu0 and cpu1 (e.g., /sys/devices/system/cpu/cpu0/). When I explored in both cores the available frequencies it seems that only 1 is possible -- 500 Mhz, such as when I tried this:
root@edison:/sys/devices/system/cpu/cpu0/cpufreq# cat scaling_available_frequencies
There were three governors available:
root@edison:/sys/devices/system/cpu/cpu0/cpufreq# cat scaling_available_governors
ondemand userspace performance
But when I tried these settings I didn't find much performance or energy difference -- though I just had a quick look.
Under each core I found 4 states available (/sys/devices/system/cpu/cpu0/cpuidle/stateX) Typical values for these states were as so:
/sys/devices/system/cpu/cpu0/cpuidle/state0/desc:CPUIDLE CORE POLL IDLE
And each has a description that seemed meaningful, though I didn't know how to interpret it. I tried disabling each state while under different governor settings thinking that this might change which power states were available during computation but again this didn't seem to result in much change.
I saw there were options for potentially turning off cores as is possible in other platforms for example:
root@edison:/sys/devices/system/cpu# echo 1 > /sys/devices/system/cpu/offline
-sh: can't create /sys/devices/system/cpu/offline: Permission denied
But as you can see the OS complained. Anyway I hope this helps others who are searching for the same type of options. And perhaps someone can suggest other things to try.
I know a lot of time has passed, and you have been waiting for an update on this topic. We've been investigating on this, but unfortunately, this functionality is not implemented even in the new releases, and currently there are no plans to implement power management.