Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6a285726 authored by Wei Wang's avatar Wei Wang
Browse files

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
parent 84719713
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -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