From 2fee52bbf54a26b3957fd3b904d725066d6db0ac Mon Sep 17 00:00:00 2001 From: Wei Wang Date: Fri, 11 Jun 2021 15:27:01 -0700 Subject: [PATCH] Relax SurfaceFlinger cpuset and adding uclamp.min for RenderEngine SurfaceFlinger IPC improved with mid and big cores, relaxing cpuset will help improve its efficiency. For render engine, we set uclamp.min to skip scheduling on little cores. FWIW, we let the RT scheduler figure out what is good for perf/power. Bug: 170507315 Bug: 191054286 Test: Build and boot Signed-off-by: Wei Wang Change-Id: I880cf549e33a3a2f629e8260366c4ce8c34c3ae6 --- conf/init.gs101.rc | 3 +++ task_profiles.json | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/conf/init.gs101.rc b/conf/init.gs101.rc index cd08d960..89cd3d3f 100644 --- a/conf/init.gs101.rc +++ b/conf/init.gs101.rc @@ -664,6 +664,9 @@ on property:sys.boot_completed=1 write /sys/kernel/vendor_sched/bg_group_throttle 512 + # Skip little core for RT vendor_grp + write /sys/kernel/vendor_sched/rt_uclamp_min 125 + # Setup cpu.shares to throttle background group at 5% write /dev/cpuctl/background/cpu.shares 1024 write /dev/cpuctl/system/cpu.shares 20480 diff --git a/task_profiles.json b/task_profiles.json index 445ad43b..70b6b910 100644 --- a/task_profiles.json +++ b/task_profiles.json @@ -175,6 +175,50 @@ } } ] + }, + { + "Name": "SFMainPolicy", + "Actions": [ + { + "Name": "JoinCgroup", + "Params": + { + "Controller": "cpuset", + "Path": "top-app" + } + }, + { + "Name": "WriteFile", + "Params": + { + "FilePath": "/sys/kernel/vendor_sched/set_task_group_fg", + "Value": "", + "LogFailures": "false" + } + } + ] + }, + { + "Name": "SFRenderEnginePolicy", + "Actions": [ + { + "Name": "JoinCgroup", + "Params": + { + "Controller": "cpuset", + "Path": "top-app" + } + }, + { + "Name": "WriteFile", + "Params": + { + "FilePath": "/sys/kernel/vendor_sched/set_task_group_rt", + "Value": "", + "LogFailures": "false" + } + } + ] } ] }