Skip to content

Latest commit

 

History

History
556 lines (476 loc) · 13.5 KB

20180330-balanced.md

File metadata and controls

556 lines (476 loc) · 13.5 KB

Project WIPE

Workload-based Interactive Parameter Explorer
DEV 20180330 V1

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
Atom z3560/3580

警告

勿作商业用途,禁止转载内容和内嵌参数
酷安ID:@yc9559

这是什么(What is it)

通过人工凭感觉调整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 20180309 V2
  • ADD Exynos 8890, Helio X20, Kirin 950的频率表支持
  • ADD 使用卡顿感知表替代原本的函数,合并自180228hmpV4
  • ADD 引入希尔不等系数TIC来衡量负载拟合程度
  • ADD 负载拟合程度不再跟卡顿评分混合在一起,独立成为目标
  • ADD 使用测试集的结果作为评价参数的好坏,测试集是训练集的超集,与训练集分数使用加权平均
  • ADD 均一化的性能评分可以跨SOC衡量卡顿程度,有助于统一质量
  • ADD 固定target_loads第一个数值,有助于解决待机耗电
  • MOD 参考的820功耗模型从2.0g延伸到2.3g,更好的模拟功耗墙
  • MOD 迭代优化器参数调整,降低迭代次数和扩大种群数量避免过拟合
  • MOD 调整above_hispeed_delay的动态锁部分,降低提升到最高频的延迟
  • MOD 公共部分HMP参数调整
  • 本版本选取ref_score <= 86的相对续航最大的参数

FAQ

  1. 如果提问下面已有的内容不再回答
  2. 几乎没有对内核的要求,官方内核即可
  3. 在本仓库/tools目录提供了有用的调试工具
  4. 如果使用的是 Kernel Auditor ,在"CPU" - "CPU调速器微调" 内输入参数
  5. 如果使用的是 EX kernel manager,更改调速器设置后开机应用会自动关闭,记得再次勾选
  6. 需要注意 Kernel Auditor 有时候会CPU占用率100%
  7. 以上两个软件都不需要保持后台,但是需要允许开机自启
  8. MIUI9默认会阻止App开机时自启动,在安全中心允许自启
  9. 没有提到的参数,或者没有找到的参数,忽略即可
  10. 公共部分的HMP参数为可选,建议Shell脚本玩家使用
  11. 如果有Perfd,请关闭,注意关闭后最低频率自动被设置为最高频率
  12. 输入升频:
  • 输入间隔设定为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/20180330-balanced.md

Disscussion & Testing in Coolapk:https://www.coolapk.com/feed/5982981

对比

与高通默认参数对比

目录

公共的部分

interactive

timer_rate: 20000
timer_slack: 80000
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

Snapdragon 835

小核最低频率设置为3xx Mhz
大核最低频率设置为3xx Mhz

小核心:
above_hispeed_delay:
18000 1380000:78000 1480000:18000 1580000:98000 1780000:38000
boostpulse_duration:
18000
go_hispeed_load:
98
hispeed_freq:
1080000
min_sample_time:
18000
target_loads:
85 380000:32 480000:8 580000:43 680000:34 780000:60 980000:73 1080000:79 1180000:99 1280000:85 1380000:57 1480000:88 1580000:93 1680000:99

大核心:
above_hispeed_delay:
18000 1480000:38000 1580000:98000 1780000:198000 1980000:38000
boostpulse_duration:
18000
go_hispeed_load:
99
hispeed_freq:
1280000
min_sample_time:
18000
target_loads:
85 380000:23 480000:33 580000:48 680000:65 780000:84 980000:75 1080000:94 1180000:78 1280000:92 1380000:99 1480000:51 1580000:98

Snapdragon 820 821

小核最低频率设置为3xx Mhz
大核最低频率设置为3xx Mhz

小核心:
above_hispeed_delay:
18000 1180000:38000 1280000:18000 1480000:38000
boostpulse_duration:
18000
go_hispeed_load:
99
hispeed_freq:
1080000
min_sample_time:
18000
target_loads:
85 380000:4 480000:36 580000:51 680000:43 780000:63 880000:72 980000:78 1080000:91 1180000:76 1280000:16 1380000:65 1480000:92 1580000:94

大核心:
above_hispeed_delay:
18000 1380000:38000 1480000:98000 1780000:198000 1980000:38000
boostpulse_duration:
18000
go_hispeed_load:
98
hispeed_freq:
1280000
min_sample_time:
18000
target_loads:
85 380000:43 480000:56 580000:3 680000:57 780000:70 980000:47 1080000:71 1180000:89 1280000:83 1480000:92 1580000:98

Snapdragon 810 808

小核最低频率设置为3xx Mhz
大核最低频率设置为3xx Mhz

小核心:
above_hispeed_delay:
18000 1280000:38000 1480000:58000
boostpulse_duration:
18000
go_hispeed_load:
99
hispeed_freq:
1180000
min_sample_time:
18000
target_loads:
85 580000:12 680000:56 780000:42 880000:69 1180000:99 1280000:86 1480000:63

大核心:
above_hispeed_delay:
198000
boostpulse_duration:
18000
go_hispeed_load:
99
hispeed_freq:
1380000
min_sample_time:
18000
target_loads:
85 480000:6 580000:36 680000:49 780000:67 880000:76 1180000:98

Snapdragon 801 800 805

最低频率设置为3xx Mhz

不区分大小核心:
above_hispeed_delay:
18000 1480000:38000 1680000:98000 1980000:38000
boostpulse_duration:
18000
go_hispeed_load:
98
hispeed_freq:
980000
min_sample_time:
18000
target_loads:
85 380000:13 580000:60 680000:67 880000:40 980000:90 1180000:83 1480000:79 1680000:89

Snapdragon 660

小核最低频率设置为6xx Mhz
大核最低频率设置为11xx Mhz

小核心:
above_hispeed_delay:
58000 1680000:98000 1780000:38000
boostpulse_duration:
18000
go_hispeed_load:
97
hispeed_freq:
1480000
min_sample_time:
18000
target_loads:
85 880000:46 1080000:66 1380000:85 1480000:77 1680000:98

大核心:
above_hispeed_delay:
58000 1780000:198000 1980000:38000
boostpulse_duration:
38000
go_hispeed_load:
75
hispeed_freq:
1080000
min_sample_time:
18000
target_loads:
85 1380000:76 1680000:98

Snapdragon 652 650

小核最低频率设置为4xx Mhz
大核最低频率设置为4xx Mhz

小核心:
above_hispeed_delay:
38000 1280000:98000
boostpulse_duration:
18000
go_hispeed_load:
99
hispeed_freq:
1180000
min_sample_time:
18000
target_loads:
85 680000:37 780000:63 980000:67 1280000:71 1380000:85

大核心:
above_hispeed_delay:
18000 1580000:98000
boostpulse_duration:
18000
go_hispeed_load:
98
hispeed_freq:
1380000
min_sample_time:
18000
target_loads:
85 880000:65 980000:75 1080000:95 1180000:82 1280000:93 1380000:73 1580000:98

Snapdragon 625 626

小核最低频率设置为6xx Mhz
大核最低频率设置为6xx Mhz

不区分大小核心:
above_hispeed_delay:
98000 1780000:198000 1980000:38000
boostpulse_duration:
18000
go_hispeed_load:
99
hispeed_freq:
1680000
min_sample_time:
18000
target_loads:
85 980000:68 1380000:97

Exynos 8895

小核最低频率设置为4xx Mhz
大核最低频率设置为7xx Mhz

小核心:
above_hispeed_delay:
98000
boostpulse_duration:
18000
go_hispeed_load:
99
hispeed_freq:
1680000
min_sample_time:
18000
target_loads:
85 680000:29 780000:47 880000:63 980000:98

大核心:
above_hispeed_delay:
18000 1680000:98000 1780000:198000 1980000:38000
boostpulse_duration:
18000
go_hispeed_load:
99
hispeed_freq:
1380000
min_sample_time:
18000
target_loads:
85 780000:78 1080000:93 1180000:76 1380000:91 1680000:98

Exynos 8890

小核最低频率设置为4xx Mhz
大核最低频率设置为7xx Mhz

小核心:
above_hispeed_delay:
98000 1580000:78000
boostpulse_duration:
18000
go_hispeed_load:
99
hispeed_freq:
1480000
min_sample_time:
18000
target_loads:
85 480000:35 780000:53 980000:69 1080000:77 1180000:99 1280000:75 1480000:97

大核心:
above_hispeed_delay:
18000 1580000:98000 1780000:198000 1980000:38000
boostpulse_duration:
18000
go_hispeed_load:
98
hispeed_freq:
1480000
min_sample_time:
18000
target_loads:
85 780000:70 980000:74 1080000:95 1180000:73 1280000:92 1380000:95 1480000:98

Exynos 7420

小核最低频率设置为4xx Mhz
大核最低频率设置为8xx Mhz

小核心:
above_hispeed_delay:
58000
boostpulse_duration:
18000
go_hispeed_load:
99
hispeed_freq:
1480000
min_sample_time:
18000
target_loads:
85 480000:35 580000:62 680000:37 780000:61 880000:46 980000:67 1080000:77 1180000:97 1280000:85 1380000:96

大核心:
above_hispeed_delay:
98000 1780000:198000 1980000:38000
boostpulse_duration:
18000
go_hispeed_load:
99
hispeed_freq:
1580000
min_sample_time:
18000
target_loads:
85 880000:79 980000:82 1180000:97

Kirin 970

小核最低频率设置为5xx Mhz
大核最低频率设置为6xx Mhz

小核心:
above_hispeed_delay:
18000 1680000:98000 1780000:58000
boostpulse_duration:
18000
go_hispeed_load:
99
hispeed_freq:
1480000
min_sample_time:
18000
target_loads:
85 980000:72 1180000:86 1380000:78 1480000:91 1680000:98

大核心:
above_hispeed_delay:
18000 1580000:98000 1780000:198000 1980000:38000
boostpulse_duration:
18000
go_hispeed_load:
99
hispeed_freq:
1480000
min_sample_time:
18000
target_loads:
85 980000:99 1180000:87 1480000:92 1580000:98

Kirin 960

小核最低频率设置为5xx Mhz
大核最低频率设置为9xx Mhz

小核心:
above_hispeed_delay:
98000
boostpulse_duration:
18000
go_hispeed_load:
99
hispeed_freq:
1680000
min_sample_time:
18000
target_loads:
85 980000:56 1380000:98

大核心:
above_hispeed_delay:
18000 1780000:198000 1980000:38000
boostpulse_duration:
38000
go_hispeed_load:
82
hispeed_freq:
1380000
min_sample_time:
18000
target_loads:
85 1380000:88 1780000:98

Kirin 950 955

小核最低频率设置为4xx Mhz
大核最低频率设置为4xx Mhz

小核心:
above_hispeed_delay:
38000 1780000:58000
boostpulse_duration:
18000
go_hispeed_load:
99
hispeed_freq:
1480000
min_sample_time:
18000
target_loads:
85 780000:53 980000:74 1280000:98 1480000:66 1780000:98

大核心:
above_hispeed_delay:
98000 1780000:198000 1980000:38000
boostpulse_duration:
18000
go_hispeed_load:
99
hispeed_freq:
1480000
min_sample_time:
18000
target_loads:
85 780000:59 1180000:98 1480000:79 1780000:98

Helio X20

最低频率使用默认值

不区分大小核心:
above_hispeed_delay:
18000 1280000:38000 1480000:98000 1780000:198000 1980000:38000
boostpulse_duration:
18000
go_hispeed_load:
98
hispeed_freq:
1080000
min_sample_time:
18000
target_loads:
85 380000:37 580000:52 680000:19 780000:61 880000:50 980000:72 1080000:83 1280000:94 1380000:13 1480000:98

Atom z3560 z3580

最低频率设置为5xx Mhz

不区分大小核心:
above_hispeed_delay:
58000 1580000:98000
boostpulse_duration:
18000
go_hispeed_load:
99
hispeed_freq:
1480000
min_sample_time:
18000
target_loads:
85 580000:41 680000:69 780000:4 880000:40 980000:52 1080000:65 1180000:92 1280000:81 1380000:77 1480000:93 1580000:98