From 6a28572648bb5573c44a2a33f735ad86a8deb374 Mon Sep 17 00:00:00 2001 From: Wei Wang Date: Mon, 30 Nov 2020 10:56:29 -0800 Subject: [PATCH] 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 --- rootdir/init.rc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/rootdir/init.rc b/rootdir/init.rc index 25ff5ff2f..6d497d1cf 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -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