Workload-based Interactive Parameter Explorer
DEV 20180330 V2 V2
Snapdragon 835, 820/821, 810/808, 801/800/805, 660, 652/650, 625/626
Exynos 8895, 8890, 7420
Kirin 970, 960, 950/955
Helio X20/X25
Atom z3560/3580
勿作商业用途,禁止转载内容和内嵌参数
Do not use for commercial purposes, prohibit reproducing content and embedding parameters in custom ROM and kernel
酷安ID:@yc9559
通过人工凭感觉调整interactive参数的方式,有如下问题:
Adjusting the interactive parameters by our feeling, there are the following problems:
- 调参难以有明确的反馈(difficulties to have clear feedback)
- 本身功耗和性能顾此失彼(hard to reach the balance of power consumption and performance)
- 参数自由度很高互相纠缠使得难以分离主要因素(complex parameters)
本计划旨在通过如下方式,制作自动化程序,来解决上述问题:
This project aims to solve the problems above by creating automated programs as follows:
- 现实负载采集(real world workload capture)
- interactive调速器流程仿真(interactive governor process simulation)
- 卡顿和耗电评分函数(cost function of lag and power comsuption)
- 迭代取得局部最优(iteration to obtain local optimum)
- 基于 Project WIPE 20180330 v1
- ADD
target_loads
动态长度支持,更短的序列得到更大的优势,减少过拟合改善一点interactive执行效率 - ADD 负载序列支持添加高斯噪声,演进10次修改一次叠加噪声,改善参数结果的鲁棒性
- ADD 新的评分函数,使用卡顿次数和卡顿程度和的乘积,卡顿感知表修改为对30fps及以下情况更加敏感
- ADD 新的待机负载模型,混合了0v0和视频硬解码的负载序列,更好地模拟低频连续负载波动效果
- ADD 修改待机耗电检测,改进了使用低频的优惠政策,不再限制
target_loads
第一位为85,使用相对百分比法 - ADD 待机耗电整合到亮屏耗电,加权取平均
- MOD 动态锁回滚到0309v2
- MOD 代码结构调整,更加面向对象(并不是)
- MOD 演化算法参数,降低收敛速度,改善搜索范围(并没有)
- MOD 公共部分的
timer_slack
修改可能改进待机耗电 - FIX 模拟
choose_freq()
中对有频率表限制的频率选择错误,感谢 酷安@yy688go - 本版本选取
ref_score <= 86
的相对续航最大的参数
- 如果提问下面已有的内容,不再回答
- 几乎没有对内核的要求,官方内核即可
- 在本仓库
/tools
目录提供了有用的调试工具 - 待机耗电一般在0.5%/h,耗电过多先检查唤醒锁,使用 Wakelock Detector
- 如果使用的是 Kernel Auditor ,在"CPU" - "CPU调速器微调" 内输入参数
- 如果使用的是 EX kernel manager,更改调速器设置后开机应用会自动关闭,记得再次勾选
- 需要注意 Kernel Auditor 有时候会CPU占用率100%
- 以上两个软件都不需要保持后台,但是需要允许开机自启
- MIUI默认会阻止App开机时自启动,在安全中心允许自启
- 没有提到的参数,或者没有找到的参数,忽略即可
- 公共部分的HMP参数为可选,建议Shell脚本玩家使用
- 如果有Perfd,请关闭,注意关闭后最低频率自动被设置为最高频率
- 卸载 Kernel Auditor 和 EX kernel manager 后重启,即可恢复默认设置
hispeed_freq
设置为>=(interactive参数中hispeed_freq)的最小值
- 输入升频:
- 输入间隔设定为50ms
- 如果是4小核,核心1-4为小核心,如果是2小核,核心1-2为小核心(对应为CPU0-3, CPU0-1)
- 小核全体为一个cluster,大核全体为一个cluster,同cluster频率同步,设置一个小核为1.2g和设置所有小核为1.2g效果等同
- 小核的输入升频频率,设置为
>=(小核的interactive参数中hispeed_freq/1000)
的最小值 - 例如小核心hispeed为1180000,那么范围是
>=1180000/1000
,得出>=1180,合适的有1190Mhz - 大核的输入升频频率,设置为0或者禁用
https://github.com/yc9559/cpufreq-interactive-opt/blob/master/20180406-balanced.md
Disscussion & Testing in Coolapk:https://www.coolapk.com/feed/6066066
- 公共的部分
- Snapdragon 835
- Snapdragon 820 821
- Snapdragon 810 808
- Snapdragon 801 800 805
- Snapdragon 660
- Snapdragon 652 650
- Snapdragon 625 626
- Exynos 8895
- Exynos 8890
- Exynos 7420
- Kirin 970
- Kirin 960
- Kirin 950
- Helio X20 X25
- Atom z3560 z3580
interactive
timer_rate: 20000
timer_slack: 180000
max_freq_hysteresis: 0
enable_prediction: 0
io_is_busy: 无所谓是多少
ignore_hispeed_on_notif: 0
use_sched_load: 1
use_migration_notif: 1
HMP
sched_freq_aggregate: 0
sched_spill_load: 90
sched_prefer_sync_wakee_to_waker: 1
小核最低频率设置为3xx Mhz
大核最低频率设置为3xx Mhz
小核心:
相对感知卡顿百分比
85.89
相对亮屏续航时间百分比
109.58
above_hispeed_delay:
98000
boostpulse_duration:
18000
go_hispeed_load:
98
hispeed_freq:
1480000
min_sample_time:
18000
target_loads:
1 480000:53 580000:37 880000:62 980000:78 1080000:83 1380000:99 1480000:92 1580000:98
大核心:
相对感知卡顿百分比
85.00
相对亮屏续航时间百分比
112.50
above_hispeed_delay:
18000 1380000:38000 1480000:18000 1580000:78000 1680000:98000 1780000:138000
boostpulse_duration:
18000
go_hispeed_load:
98
hispeed_freq:
1280000
min_sample_time:
18000
target_loads:
1 480000:68 580000:22 680000:37 780000:87 880000:79 1280000:84 1380000:89 1580000:98
小核最低频率设置为3xx Mhz
大核最低频率设置为3xx Mhz
小核心:
相对感知卡顿百分比
84.11
相对亮屏续航时间百分比
117.84
above_hispeed_delay:
18000 1480000:98000
boostpulse_duration:
18000
go_hispeed_load:
99
hispeed_freq:
1380000
min_sample_time:
18000
target_loads:
1 480000:51 780000:73 980000:84 1080000:76 1180000:90 1380000:84 1480000:92 1580000:98
大核心:
相对感知卡顿百分比
84.11
相对亮屏续航时间百分比
117.84
above_hispeed_delay:
18000 1480000:98000 1780000:58000 1780000:138000
boostpulse_duration:
18000
go_hispeed_load:
99
hispeed_freq:
1380000
min_sample_time:
18000
target_loads:
1 480000:51 780000:73 980000:84 1080000:76 1180000:90 1380000:84 1480000:92 1580000:98
小核最低频率设置为3xx Mhz
大核最低频率设置为3xx Mhz
小核心:
相对感知卡顿百分比
89.99
相对亮屏续航时间百分比
105.15
above_hispeed_delay:
18000 1480000:98000
boostpulse_duration:
18000
go_hispeed_load:
98
hispeed_freq:
1180000
min_sample_time:
18000
target_loads:
2 580000:43 680000:37 780000:45 880000:75 1280000:92 1480000:99
大核心:
相对感知卡顿百分比
89.67
相对亮屏续航时间百分比
129.07
above_hispeed_delay:
98000 1580000:138000
boostpulse_duration:
18000
go_hispeed_load:
98
hispeed_freq:
1280000
min_sample_time:
18000
target_loads:
1 480000:42 580000:37 680000:44 780000:63 880000:77 1180000:97
最低频率设置为3xx Mhz
不区分大小核心:
相对感知卡顿百分比
85.87
相对亮屏续航时间百分比
111.03
above_hispeed_delay:
18000 1680000:98000 1780000:138000
boostpulse_duration:
18000
go_hispeed_load:
99
hispeed_freq:
1180000
min_sample_time:
18000
target_loads:
1 580000:52 680000:27 880000:48 980000:83 1480000:97
小核最低频率设置为6xx Mhz
大核最低频率设置为11xx Mhz
小核心:
相对感知卡顿百分比
85.18
相对亮屏续航时间百分比
108.20
above_hispeed_delay:
18000 1680000:98000
boostpulse_duration:
18000
go_hispeed_load:
99
hispeed_freq:
1380000
min_sample_time:
18000
target_loads:
47 880000:60 1080000:80 1480000:99
大核心:
相对感知卡顿百分比
84.87
相对亮屏续航时间百分比
107.66
above_hispeed_delay:
18000 1380000:78000 1680000:98000 1780000:138000
boostpulse_duration:
78000
go_hispeed_load:
89
hispeed_freq:
1080000
min_sample_time:
18000
target_loads:
92 1380000:77 1680000:99
小核最低频率设置为4xx Mhz
大核最低频率设置为4xx Mhz
小核心:
相对感知卡顿百分比
85.35
相对亮屏续航时间百分比
104.77
above_hispeed_delay:
18000 1380000:78000
boostpulse_duration:
18000
go_hispeed_load:
99
hispeed_freq:
1180000
min_sample_time:
18000
target_loads:
35 780000:48 980000:75 1280000:98
大核心:
相对感知卡顿百分比
85.55
相对亮屏续航时间百分比
109.74
above_hispeed_delay:
18000 1580000:98000
boostpulse_duration:
18000
go_hispeed_load:
98
hispeed_freq:
1380000
min_sample_time:
18000
target_loads:
52 880000:69 980000:75 1080000:81 1380000:89 1580000:98
小核最低频率设置为6xx Mhz
大核最低频率设置为6xx Mhz
不区分大小核心:
相对感知卡顿百分比
85.66
相对亮屏续航时间百分比
109.08
above_hispeed_delay:
18000 1680000:98000 1780000:138000
boostpulse_duration:
38000
go_hispeed_load:
94
hispeed_freq:
1380000
min_sample_time:
18000
target_loads:
64 980000:68 1380000:86 1680000:98
小核最低频率设置为4xx Mhz
大核最低频率设置为7xx Mhz
小核心:
相对感知卡顿百分比
84.02
相对亮屏续航时间百分比
102.01
above_hispeed_delay:
18000 1680000:98000
boostpulse_duration:
38000
go_hispeed_load:
98
hispeed_freq:
1380000
min_sample_time:
18000
target_loads:
65 680000:47 980000:71 1380000:96
大核心:
相对感知卡顿百分比
85.88
相对亮屏续航时间百分比
106.94
above_hispeed_delay:
18000 1680000:98000 1780000:138000
boostpulse_duration:
18000
go_hispeed_load:
97
hispeed_freq:
1380000
min_sample_time:
18000
target_loads:
69 780000:55 880000:67 1080000:85 1680000:97
小核最低频率设置为4xx Mhz
大核最低频率设置为7xx Mhz
小核心:
相对感知卡顿百分比
85.98
相对亮屏续航时间百分比
105.17
above_hispeed_delay:
18000 1480000:98000 1580000:38000
boostpulse_duration:
18000
go_hispeed_load:
98
hispeed_freq:
1280000
min_sample_time:
18000
target_loads:
2 480000:53 980000:64 1080000:68 1180000:76 1280000:91
大核心:
相对感知卡顿百分比
85.22
相对亮屏续航时间百分比
107.59
above_hispeed_delay:
18000 1580000:98000 1780000:138000
boostpulse_duration:
18000
go_hispeed_load:
99
hispeed_freq:
1480000
min_sample_time:
18000
target_loads:
75 780000:61 880000:70 1080000:78 1180000:88 1480000:97
小核最低频率设置为4xx Mhz
大核最低频率设置为8xx Mhz
小核心:
相对感知卡顿百分比
84.73
相对亮屏续航时间百分比
103.91
above_hispeed_delay:
18000 1380000:78000
boostpulse_duration:
18000
go_hispeed_load:
99
hispeed_freq:
1280000
min_sample_time:
18000
target_loads:
1 480000:27 780000:54 980000:76 1380000:93
大核心:
相对感知卡顿百分比
85.98
相对亮屏续航时间百分比
109.02
above_hispeed_delay:
18000 1580000:98000 1780000:138000
boostpulse_duration:
18000
go_hispeed_load:
99
hispeed_freq:
1480000
min_sample_time:
18000
target_loads:
69 880000:59 980000:66 1080000:74 1280000:92 1580000:98
小核最低频率设置为5xx Mhz
大核最低频率设置为6xx Mhz
小核心:
相对感知卡顿百分比
84.17
相对亮屏续航时间百分比
103.71
above_hispeed_delay:
18000 1680000:98000
boostpulse_duration:
18000
go_hispeed_load:
99
hispeed_freq:
1180000
min_sample_time:
18000
target_loads:
54 980000:68 1180000:81 1480000:99
大核心:
相对感知卡顿百分比
85.37
相对亮屏续航时间百分比
107.47
above_hispeed_delay:
18000 1580000:98000 1780000:138000
boostpulse_duration:
18000
go_hispeed_load:
99
hispeed_freq:
1480000
min_sample_time:
18000
target_loads:
84 980000:76 1280000:89 1580000:99
小核最低频率设置为5xx Mhz
大核最低频率设置为9xx Mhz
小核心:
相对感知卡顿百分比
85.17
相对亮屏续航时间百分比
106.95
above_hispeed_delay:
18000 1680000:98000
boostpulse_duration:
18000
go_hispeed_load:
98
hispeed_freq:
1380000
min_sample_time:
18000
target_loads:
53 980000:67 1380000:94 1680000:98
大核心:
相对感知卡顿百分比
85.62
相对亮屏续航时间百分比
105.82
above_hispeed_delay:
18000 1780000:138000
boostpulse_duration:
38000
go_hispeed_load:
99
hispeed_freq:
1380000
min_sample_time:
18000
target_loads:
71 1380000:94 1780000:98
小核最低频率设置为4xx Mhz
大核最低频率设置为4xx Mhz
小核心:
相对感知卡顿百分比
84.54
相对亮屏续航时间百分比
104.70
above_hispeed_delay:
38000
boostpulse_duration:
18000
go_hispeed_load:
99
hispeed_freq:
1480000
min_sample_time:
18000
target_loads:
29 780000:48 980000:80 1480000:98
大核心:
相对感知卡顿百分比
85.34
相对亮屏续航时间百分比
109.38
above_hispeed_delay:
98000 1780000:138000
boostpulse_duration:
18000
go_hispeed_load:
99
hispeed_freq:
1480000
min_sample_time:
18000
target_loads:
67 1180000:83 1480000:98
最低频率使用默认值
不区分大小核心:
相对感知卡顿百分比
85.75
相对亮屏续航时间百分比
117.36
above_hispeed_delay:
98000 1780000:138000
boostpulse_duration:
18000
go_hispeed_load:
98
hispeed_freq:
1380000
min_sample_time:
18000
target_loads:
1 580000:46 680000:24 780000:46 880000:56 980000:73 1080000:80 1380000:99
最低频率设置为5xx Mhz
不区分大小核心:
相对感知卡顿百分比
77.69
相对亮屏续航时间百分比
115.95
above_hispeed_delay:
98000 1780000:138000
boostpulse_duration:
18000
go_hispeed_load:
98
hispeed_freq:
1480000
min_sample_time:
18000
target_loads:
36 680000:47 1080000:64 1180000:74 1280000:85 1380000:95 1480000:83 1580000:98