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