生活随笔
收集整理的這篇文章主要介紹了
高通msm8994手动提升性能脚本
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
點(diǎn)擊打開鏈接
[plain]?view plaincopy
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頻率是按簇調(diào)整的,因此只需要設(shè)置cpu0和cpu4的performance。
拉起來的瞬間可能會觸發(fā)bcl的調(diào)頻和拔核動作,全部拉起來后可能溫度過高導(dǎo)致thermal降頻及拔核。
另外,vendor/qcom/proprietary/Android-perf/core-ctl/core_ctl.c的某些代碼可能會引起拉核失敗或者拉上來后又被這個模塊給down了,需要做如下修改:
將753行cpu_callback()的CPU_UP_PREPARE分支里的如下判斷改成if(0),這可以防止拉核失敗:
將該文件try_hotplug()函數(shù)里的do_hotplug()取消掉,可以防止該模塊又把拉上來的cpu給offline了。
不過如此修改代碼后,需要手動降低性能:
[plain]?view plaincopy
#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 plaincopy
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頻率是按簇調(diào)整的,因此只需要設(shè)置cpu0和cpu4的performance。
拉起來的瞬間可能會觸發(fā)bcl的調(diào)頻和拔核動作,全部拉起來后可能溫度過高導(dǎo)致thermal降頻及拔核。
另外,vendor/qcom/proprietary/Android-perf/core-ctl/core_ctl.c的某些代碼可能會引起拉核失敗或者拉上來后又被這個模塊給down了,需要做如下修改:
將753行cpu_callback()的CPU_UP_PREPARE分支里的如下判斷改成if(0),這可以防止拉核失敗:
將該文件try_hotplug()函數(shù)里的do_hotplug()取消掉,可以防止該模塊又把拉上來的cpu給offline了。
不過如此修改代碼后,需要手動降低性能:
[plain]?view plaincopy
#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??
總結(jié)
以上是生活随笔為你收集整理的高通msm8994手动提升性能脚本的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。