From b539cf2067db96e80c8255e5e41223c0c37dc90f Mon Sep 17 00:00:00 2001 From: Andrzej Perczak Date: Thu, 11 May 2023 02:32:32 +0200 Subject: [PATCH] [PATCH] LG8n: Import oriole cpuctl tuning This is done in preparation for uclamp migration and FAIR_GROUP_SCHED enablement in kernel. Change-Id: Ib486c9bcdfa18d7362461e1a8f66d6fb288af709 Signed-off-by: xyzuniverse Signed-off-by: fjrXTR Signed-off-by: Shirayuki39 --- rootdir/etc/init/hw/init.mt6789.rc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/rootdir/etc/init/hw/init.mt6789.rc b/rootdir/etc/init/hw/init.mt6789.rc index ab66c6e..5e9fca4 100644 --- a/rootdir/etc/init/hw/init.mt6789.rc +++ b/rootdir/etc/init/hw/init.mt6789.rc @@ -1112,4 +1112,16 @@ service vendor.charger /system/bin/charger file /dev/kmsg w file /sys/fs/pstore/console-ramoops-0 r file /sys/fs/pstore/console-ramoops r - file /proc/last_kmsg r \ No newline at end of file + file /proc/last_kmsg r + +on property:sys.boot_completed=1 +# Setup cpu.shares to throttle background groups (bg ~ 5% sysbg ~ 10%) + write /dev/cpuctl/background/cpu.shares 1024 + write /dev/cpuctl/system-background/cpu.shares 2048 + write /dev/cpuctl/system/cpu.shares 20480 + # We only have system and background groups holding tasks and the groups below are empty + write /dev/cpuctl/camera-daemon/cpu.shares 20480 + write /dev/cpuctl/foreground/cpu.shares 20480 + write /dev/cpuctl/nnapi-hal/cpu.shares 20480 + write /dev/cpuctl/rt/cpu.shares 20480 + write /dev/cpuctl/top-app/cpu.shares 20480