init.rc: create camera-deamon stune cgroup

camera-daemon is referred in task-profiles.json so the hierarchy should
be created in aosp's init.rc.

Bug: 170507876
Bug: 171740453
Test: boot and check cgroup
Change-Id: I0e6722b88922abf4ccae3b19623d8b889a6e3cb6
This commit is contained in:
Wei Wang 2020-11-30 10:56:29 -08:00
parent 84719713c7
commit 6a28572648
1 changed files with 9 additions and 1 deletions

View File

@ -204,12 +204,20 @@ on init
write /dev/cpuctl/rt/cpu.rt_period_us 1000000
write /dev/cpuctl/system/cpu.rt_runtime_us 100000
write /dev/cpuctl/system/cpu.rt_period_us 1000000
write /dev/cpuctl/nnapi-hal/cpu.rt_runtime_us 100000
write /dev/cpuctl/nnapi-hal/cpu.rt_runtime_us 50000
write /dev/cpuctl/nnapi-hal/cpu.rt_period_us 1000000
write /dev/cpuctl/camera-daemon/cpu.rt_runtime_us 50000
write /dev/cpuctl/camera-daemon/cpu.rt_period_us 1000000
# Migrate root group to system subgroup
copy_per_line /dev/cpuctl/tasks /dev/cpuctl/system/tasks
# Create an stune group for camera-specific processes
mkdir /dev/stune/camera-daemon
chown system system /dev/stune/camera-daemon
chown system system /dev/stune/camera-daemon/tasks
chmod 0664 /dev/stune/camera-daemon/tasks
# Create an stune group for NNAPI HAL processes
mkdir /dev/stune/nnapi-hal
chown system system /dev/stune/nnapi-hal