高通linux-cpu频率动态调节系统

版权声明:本文为博主原创文章,未经博主允许不得转载。转载请标注出处: https://blog.csdn.net/sheji105/article/details/82626173
    1. 概述

在板子上执行命令:

  1. # ls -lh /sys/devices/system/cpu/  
  2. total 0  
  3. drwxr-xr-x    7 root     root           0 Aug 15 00:00 cpu0  
  4. drwxr-xr-x    5 root     root           0 Aug 15 00:00 cpu1  
  5. drwxr-xr-x    5 root     root           0 Aug 15 00:00 cpu2  
  6. drwxr-xr-x    5 root     root           0 Aug 15 00:00 cpu3  
  7. drwxr-xr-x    3 root     root           0 Aug 15 00:00 cpufreq  
  8. drwxr-xr-x    2 root     root           0 Aug 15 00:08 cpuidle  
  9. -r--r--r--    1 root     root        4.0K Aug 15 00:08 kernel_max  
  10. -r--r--r--    1 root     root        4.0K Aug 15 00:08 offline  
  11. -r--r--r--    1 root     root        4.0K Aug 15 00:00 online  
  12. -r--r--r--    1 root     root        4.0K Aug 15 00:08 possible  
  13. drwxr-xr-x    2 root     root           0 Aug 15 00:08 power  
  14. -r--r--r--    1 root     root        4.0K Aug 15 00:08 present  
  15. -rw-r--r--    1 root     root        4.0K Aug 15 00:08 uevent 

 

online:正在工作的cpu;

offline:目前被关掉的cpu;

present:已经安装的cpu

cpuxx:是目录,第几个cpu

 

  1. # ls -lh /sys/devices/system/cpu/cpu0/cpufreq/  
  2. total 0  
  3. -r--r--r--    1 root     root        4.0K Aug 15 00:18 affected_cpus  
  4. -r--------    1 root     root        4.0K Aug 15 00:18 cpuinfo_cur_freq  
  5. -r--r--r--    1 root     root        4.0K Aug 15 00:18 cpuinfo_max_freq  
  6. -r--r--r--    1 root     root        4.0K Aug 15 00:18 cpuinfo_min_freq  
  7. -r--r--r--    1 root     root        4.0K Aug 15 00:18 cpuinfo_transition_latency  
  8. -r--r--r--    1 root     root        4.0K Aug 15 00:18 related_cpus  
  9. -r--r--r--    1 root     root        4.0K Aug 15 00:00 scaling_available_frequencies  
  10. -r--r--r--    1 root     root        4.0K Aug 15 00:18 scaling_available_governors  
  11. -r--r--r--    1 root     root        4.0K Aug 15 00:18 scaling_cur_freq  
  12. -r--r--r--    1 root     root        4.0K Aug 15 00:18 scaling_driver  
  13. -rw-r--r--    1 root     root        4.0K Aug 15 00:00 scaling_governor  
  14. -rw-r--r--    1 root     root        4.0K Aug 15 00:18 scaling_max_freq  
  15. -rw-r--r--    1 root     root        4.0K Aug 15 00:00 scaling_min_freq  
  16. -rw-r--r--    1 root     root        4.0K Aug 15 00:18 scaling_setspeed  
  17. drwxr-xr-x    2 root     root           0 Aug 15 00:18 stats  

 

cpuinfo_cur_freq    scaling_cur_freq:当前频率

cpuinfo_max_freq  scaling_ max _freq:最大频率

cpuinfo_min_freq   scaling_ min _freq:最小频率

 

前缀cpuinfo:cpu硬件上支持的频率;

前缀scaling:软件方式通过CPUFreq系统进行调节时所支持的频率

 

# cat scaling_available_frequencies

200000 400000 533333 800000 998400 1094400 1190400 1248000 1267200

scaling_available_frequencies:支持的频率

 

猜你喜欢

转载自blog.csdn.net/sheji105/article/details/82626173