[plain] view plain copy
- stop thermald
- stop mpdecision
- stop thermal-engine
- # online A57
- echo 1 > /sys/devices/system/cpu/cpu2/online
- echo 1 > /sys/devices/system/cpu/cpu3/online
- echo 1 > /sys/devices/system/cpu/cpu4/online
- echo 1 > /sys/devices/system/cpu/cpu5/online
- echo 1 > /sys/devices/system/cpu/cpu6/online
- echo 1 > /sys/devices/system/cpu/cpu7/online
- # set governor
- echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
- echo performance > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
- # set max freq
- echo 1555200 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
- echo 1958400 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq
- # set gpu
- echo performance > /sys/class/kgsl/kgsl-3d0/devfreq/governor
- echo 0 > /sys/class/kgsl/kgsl-3d0/min_pwrlevel
- echo performance > /sys/class/devfreq/qcom,cpubw.32/governor
- echo performance > /sys/class/devfreq/qcom,gpubw.71/governor
- echo performance > /sys/class/devfreq/qcom,kgsl-busmon.70/governor
cpu0会一直在线,因此不用手动online。
8994的cpu频率是按簇调整的,因此只需要设置cpu0和cpu4的performance。
拉起来的瞬间可能会触发bcl的调频和拔核动作,全部拉起来后可能温度过高导致thermal降频及拔核。
另外,vendor/qcom/proprietary/Android-perf/core-ctl/core_ctl.c的某些代码可能会引起拉核失败或者拉上来后又被这个模块给down了,需要做如下修改:
将753行cpu_callback()的CPU_UP_PREPARE分支里的如下判断改成if(0),这可以防止拉核失败:
将该文件try_hotplug()函数里的do_hotplug()取消掉,可以防止该模块又把拉上来的cpu给offline了。
不过如此修改代码后,需要手动降低性能:
[plain] view plain copy
- #offline A57
- echo 0 > /sys/devices/system/cpu/cpu4/online
- echo 0 > /sys/devices/system/cpu/cpu5/online
- echo 0 > /sys/devices/system/cpu/cpu6/online
- echo 0 > /sys/devices/system/cpu/cpu7/online
- # down max freq
- echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
- echo simple_ondemand > /sys/class/kgsl/kgsl-3d0/devfreq/governor
- echo 5 > /sys/class/kgsl/kgsl-3d0/min_pwrlevel
[plain] view plain copy
- stop thermald
- stop mpdecision
- stop thermal-engine
- # online A57
- echo 1 > /sys/devices/system/cpu/cpu2/online
- echo 1 > /sys/devices/system/cpu/cpu3/online
- echo 1 > /sys/devices/system/cpu/cpu4/online
- echo 1 > /sys/devices/system/cpu/cpu5/online
- echo 1 > /sys/devices/system/cpu/cpu6/online
- echo 1 > /sys/devices/system/cpu/cpu7/online
- # set governor
- echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
- echo performance > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
- # set max freq
- echo 1555200 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
- echo 1958400 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq
- # set gpu
- echo performance > /sys/class/kgsl/kgsl-3d0/devfreq/governor
- echo 0 > /sys/class/kgsl/kgsl-3d0/min_pwrlevel
- echo performance > /sys/class/devfreq/qcom,cpubw.32/governor
- echo performance > /sys/class/devfreq/qcom,gpubw.71/governor
- echo performance > /sys/class/devfreq/qcom,kgsl-busmon.70/governor
cpu0会一直在线,因此不用手动online。
8994的cpu频率是按簇调整的,因此只需要设置cpu0和cpu4的performance。
拉起来的瞬间可能会触发bcl的调频和拔核动作,全部拉起来后可能温度过高导致thermal降频及拔核。
另外,vendor/qcom/proprietary/Android-perf/core-ctl/core_ctl.c的某些代码可能会引起拉核失败或者拉上来后又被这个模块给down了,需要做如下修改:
将753行cpu_callback()的CPU_UP_PREPARE分支里的如下判断改成if(0),这可以防止拉核失败:
将该文件try_hotplug()函数里的do_hotplug()取消掉,可以防止该模块又把拉上来的cpu给offline了。
不过如此修改代码后,需要手动降低性能:
[plain] view plain copy
- #offline A57
- echo 0 > /sys/devices/system/cpu/cpu4/online
- echo 0 > /sys/devices/system/cpu/cpu5/online
- echo 0 > /sys/devices/system/cpu/cpu6/online
- echo 0 > /sys/devices/system/cpu/cpu7/online
- # down max freq
- echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
- echo simple_ondemand > /sys/class/kgsl/kgsl-3d0/devfreq/governor
- echo 5 > /sys/class/kgsl/kgsl-3d0/min_pwrlevel