CPU Scaling
1、performance 將cpu用於處於最高狀態
2、powersave 將cpu設置爲最低狀態
3、userspace 手動設置cpu
4、ondemand 和 conservative都是內核自己cpu算法控制,不同的是ondemand是如果有負載,則直接升到高;conservative則step by step
如果編譯成模塊的,可以在/etc/modules添加達到boot的時候加載
Android如何使用?
在init.rc中
# Give write permission for some of the CPU scaling sysfs file
chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
#set cpu freq ondemand
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor conservative