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