Skip to content

Commit

Permalink
DEV 21.07.25
Browse files Browse the repository at this point in the history
1. 本次更新合并了10+个commit
2. 预调参配置增加
   1. 骁龙650/652-eas
3. 修复负优化
   1. AffinityHelper线程在应用切换时被频繁唤醒
   2. 微信跳转到内置浏览器加载时间过长
4. 预调参调整
   1. 均衡模式`SfLag`不再主动搬运负载到超大核
5. 改进
   1. 放宽未知分类任务的性能释放
6. 重构
   1. 全局统一缓存的任务分类器,缓存重建时间从450ms降低到150ms(sdm888平台测试)

Signed-off-by: Matt Yang <yccy@outlook.com>
  • Loading branch information
yc9559 committed Jul 25, 2021
1 parent c7846d0 commit 43e4fb8
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 9 deletions.
3 changes: 2 additions & 1 deletion magisk/initsvc_uperf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ wait_until_login()

crash_recuser()
{
rm $BASEDIR/logcat.log
logcat -f $BASEDIR/logcat.log &
sleep 60
kill -9 $!
killall logcat
rm -f $BASEDIR/flags/.need_recuser
}

Expand Down
2 changes: 1 addition & 1 deletion magisk/module.prop
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id=uperf
name=Uperf
version=v2 (21.06.20)
version=v2 (21.07.25)
versionCode=2
author=Matt Yang
description=Userspace performance controller for android. Repo: https://github.com/yc9559/uperf/
Expand Down
8 changes: 4 additions & 4 deletions magisk/script/powercfg_once.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ unify_sched()
set_sched_migrate "50" "15" "999" "888"
set_sched_migrate "50 90" "15 70" "999" "888"

# prefer to use prev cpu, decrease jitter from 0.5ms to 0.3ms with lpm settings
# system_server binders maybe pinned on perf cluster due to this
# lock_val "10000000" $SCHED/sched_migration_cost_ns
# 10ms=10000000, prefer to use prev cpu, decrease jitter from 0.5ms to 0.3ms with lpm settings
# 0.2ms=200000, prevent system_server binders pinned on perf cluster
lock_val "200000" $SCHED/sched_migration_cost_ns
}

unify_lpm()
Expand All @@ -172,7 +172,7 @@ unify_lpm()
lock_val "5" $LPM/bias_hyst
lock_val "0" $LPM/lpm_prediction
elif [ -f "$SCHED/sched_busy_hyst_ns" ]; then
lock_val "255" $SCHED/sched_busy_hysteresis_enable_cpus
lock_val "127" $SCHED/sched_busy_hysteresis_enable_cpus # seem not working well on cpu7
lock_val "0" $SCHED/sched_coloc_busy_hysteresis_enable_cpus
lock_val "5000000" $SCHED/sched_busy_hyst_ns
lock_val "0" $LPM/lpm_prediction
Expand Down
2 changes: 2 additions & 0 deletions magisk/script/start_injector.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ inj_do_inject()

# try to allow executing dlopen in surfaceflinger
magiskpolicy --live "allow surfaceflinger system_lib_file file { read getattr execute }" >> "$LOG_FILE"
magiskpolicy --live "allow surfaceflinger system_data_file file { read write getattr }" >> "$LOG_FILE"
magiskpolicy --live "allow surfaceflinger system_data_file dir { read write getattr search }" >> "$LOG_FILE"

"$MODULE_PATH/$INJ_REL/$INJ_NAME" "$lib_path" >> "$LOG_FILE"

Expand Down
24 changes: 21 additions & 3 deletions magisk/setup_uperf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,24 @@ _get_sdm660_type()
fi
}

_get_sdm652_type()
{
if [ "$(_is_eas)" == "true" ]; then
echo "sdm652_eas"
else
echo "sdm652_hmp"
fi
}

_get_sdm650_type()
{
if [ "$(_is_eas)" == "true" ]; then
echo "sdm650_eas"
else
echo "sdm650_hmp"
fi
}

_get_sdm626_type()
{
if [ "$(_is_eas)" == "true" ]; then
Expand Down Expand Up @@ -324,8 +342,8 @@ _get_cfgname()
"sdm636") ret="$(_get_sdm636_type)" ;;
"trinket") ret="sdm665" ;;
"bengal") ret="sdm665" ;; # sdm662
"msm8976") ret="sdm652" ;;
"msm8956") ret="sdm650" ;;
"msm8976") ret="$(_get_sdm652_type)" ;;
"msm8956") ret="$(_get_sdm650_type)" ;;
"msm8998") ret="$(_get_sdm835_type)" ;;
"msm8996") ret="$(_get_sdm82x_type)" ;;
"msm8996pro") ret="$(_get_sdm82x_type)" ;;
Expand Down Expand Up @@ -360,7 +378,7 @@ uperf_print_banner()
echo ""
echo "* Uperf https://github.com/yc9559/uperf/"
echo "* Author: Matt Yang"
echo "* Version: v2 (21.06.20)"
echo "* Version: v2 (21.07.25)"
echo ""
}

Expand Down

0 comments on commit 43e4fb8

Please sign in to comment.