P21: enable throttle background group at 5%

Right now we have many groups due to uclamp setup, and this would
potentially create interesting fairness between groups.

Ultimately we want only a system group and a background group for
cpu.shares, which would achieve after b/182509410 resolved.

Test: boot and check setting
Bug: 171740453
Change-Id: I8fa23268aa7ed02dcccc527abcec8556009aa9a7
This commit is contained in:
Wei Wang 2021-03-10 23:00:02 -08:00 committed by TreeHugger Robot
parent be26bc083e
commit 6d4c63e896

View file

@ -634,6 +634,17 @@ on property:sys.boot_completed=1
write /sys/kernel/vendor_sched/ta_uclamp_min 103
write /sys/kernel/vendor_sched/fg_uclamp_min 0
# Setup cpu.shares to throttle background group at 5%
write /dev/cpuctl/background/cpu.shares 1024
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/system-background/cpu.shares 20480
write /dev/cpuctl/top-app/cpu.shares 20480
# gvotables for dumpstate
chown system system /sys/kernel/debug/gvotables