Skip to content

Commit

Permalink
DEV 21.05.23
Browse files Browse the repository at this point in the history
1. 本次更新合并了20+个commit
2. 新增:SfAnalysis可完整监控帧提交完整流程,内容刷新率切换延迟200ms->110ms
3. 新增:变时长sflag和sfboot,可在发生卡顿的帧渲染结束后提前结束
4. 新增:显式触摸状态hint,方便对触摸各个阶段定制对应action
5. 改进:卡顿模式改用超低主频方案,充分发挥变时长sflag和sfboot特性
6. 改进:费电模式改用高主频方案,不同设备stune支持差异较大例如移植的EAS和PELT EAS
7. 改进:bootloop recuser统一到在postfs阶段放置标志位,正常开机后模块不再显示为禁用
8. 改进:动态帧率切换改为同步调用,解决异步+固定等待时长导致的时序问题
9. 改进:降低过渡动画对应动作性能拉升强度,延长持续时间,配合Sfboost兼顾流畅度和功耗
10. 改进:webview线程放置,H5页面滑动和公众号文章浏览流畅度更好
11. 改进:配合kworker执行时序,CPU主频设置延时0.6ms->0.2ms
12. 改进:减少任务放置执行数量,任务放置延时0.6ms->0.4ms
13. 改进:小重构TaskClassfier代码实现

Signed-off-by: Matt Yang <yccy@outlook.com>
  • Loading branch information
yc9559 committed May 23, 2021
1 parent aed0c0f commit 3638aff
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 31 deletions.
19 changes: 6 additions & 13 deletions magisk/common/post-fs-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,11 @@ remove_unnecessary_overlay()
done
}

remove_all_overlay()
{
rm -rf "$MODDIR/system/vendor/etc"
}

crash_recuser()
{
true > $MODDIR/flags/crash_on_postfs
sleep 30
rm -f $MODDIR/flags/crash_on_postfs
}
if [ -f "$MODDIR/flags/.need_recuser" ]; then
rm -f $MODDIR/flags/.need_recuser
true > $MODDIR/disable
else
true > $MODDIR/flags/.need_recuser
fi

remove_unnecessary_overlay
[ -f "$MODDIR/flags/crash_on_postfs" ] && remove_all_overlay
(crash_recuser &)
4 changes: 4 additions & 0 deletions magisk/common/system.prop
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@

# unify surfaceflinger props
debug.sf.latch_unsignaled=1
debug.sf.disable_backpressure=0
ro.surface_flinger.max_frame_buffer_acquired_buffers=4
persist.sys.miui.sf_cores=6
persist.sys.miui_animator_sched.bigcores=6-7
10 changes: 2 additions & 8 deletions magisk/initsvc_uperf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,10 @@ wait_until_login()

crash_recuser()
{
local logcat_pid

true > $BASEDIR/disable
logcat -f $BASEDIR/logcat.log &
logcat_pid=$!

sleep 60

rm -f $BASEDIR/disable
kill -9 $logcat_pid
kill -9 $!
rm -f $BASEDIR/flags/.need_recuser
}

(crash_recuser &)
Expand Down
2 changes: 1 addition & 1 deletion magisk/makezip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ zipname="uperf-magisk.zip"

echo "Compile Uperf binary..."
cd ..
make clean 1> /dev/null
# make clean 1> /dev/null
make ndkbuild 1> /dev/null

echo "Compile Uperf configs..."
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.05.02)
version=v2 (21.05.23)
versionCode=2
author=Matt Yang
description=Userspace performance controller for android. Repo: https://github.com/yc9559/uperf/
Expand Down
14 changes: 7 additions & 7 deletions magisk/script/powercfg_once.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ unify_cgroup()
done

# launcher is usually in foreground group, uperf will take care of them
lock_val "0-7" /dev/cpuset/foreground/boost/cpus
lock_val "0-7" /dev/cpuset/foreground/cpus
lock_val "1-7" /dev/cpuset/foreground/boost/cpus
lock_val "1-7" /dev/cpuset/foreground/cpus
lock_val "0-6" /dev/cpuset/restricted/cpus
# VMOS may set cpuset/background/cpus to "0"
lock /dev/cpuset/background/cpus
Expand Down Expand Up @@ -110,8 +110,8 @@ unify_cgroup()
# prevent display service from being preempted by normal tasks
# vendor.qti.hardware.display.allocator-service cannot be set to RT policy, will be reset to 120
unpin_proc "\.hardware\.display"
change_task_affinity "\.hardware\.display" "7f"
change_task_rt "\.hardware\.display" "2"
change_task_rt "\.composer" "2"
# vendor.qti.hardware.perf@2.2-service blocks hardware.display.composer-service
# perf will automatically set self to prio=100
unpin_proc "\.hardware\.perf"
Expand Down Expand Up @@ -139,6 +139,7 @@ unify_cgroup()
change_thread_cgroup "system_server" "android.display" "top-app" "stune"
change_thread_cgroup "system_server" "android.display" "top-app" "cpuctl"
change_thread_cgroup "system_server" "android.ui" "top-app" "cpuset"
change_thread_cgroup "system_server" "android.bg" "top-app" "cpuset"

# Heavy Scene Boost
# boost app boot process, zygote--com.xxxx.xxx
Expand Down Expand Up @@ -191,7 +192,6 @@ unify_sched()
{
# disable sched global placement boost
lock_val "0" $SCHED/sched_boost
lock_val "0" $SCHED/sched_walt_rotate_big_tasks
lock_val "1000" $SCHED/sched_min_task_util_for_boost
lock_val "1000" $SCHED/sched_min_task_util_for_colocation
lock_val "0" $SCHED/sched_conservative_pl
Expand All @@ -211,7 +211,7 @@ unify_sched()
# The same Binder, A55@1.0g took 7.3ms,A76@1.0g took 3.0ms, in this case, A76's efficiency is 2.4x of A55's.
# However in EAS model A76's efficiency is 1.7x of A55's, so the down migrate threshold need compensate.
set_sched_migrate "50" "15" "999" "888"
set_sched_migrate "50 90" "15 60" "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
Expand All @@ -225,12 +225,12 @@ unify_lpm()
lock_val "0" $LPM/sleep_disabled
lock_val "0" $LPM/lpm_ipi_prediction
if [ -f "$LPM/bias_hyst" ]; then
lock_val "2" $LPM/bias_hyst
lock_val "10" $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 "0" $SCHED/sched_coloc_busy_hysteresis_enable_cpus
lock_val "2000000" $SCHED/sched_busy_hyst_ns
lock_val "10000000" $SCHED/sched_busy_hyst_ns
lock_val "0" $LPM/lpm_prediction
else
lock_val "1" $LPM/lpm_prediction
Expand Down
2 changes: 1 addition & 1 deletion magisk/setup_uperf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ uperf_print_banner()
echo ""
echo "* Uperf https://github.com/yc9559/uperf/"
echo "* Author: Matt Yang"
echo "* Version: v2 (21.05.02)"
echo "* Version: v2 (21.05.23)"
echo ""
}

Expand Down

0 comments on commit 3638aff

Please sign in to comment.