diff --git a/rootdir/init.rc b/rootdir/init.rc index 900edb4cc..746fc61dc 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -148,6 +148,27 @@ on init chmod 0664 /dev/stune/top-app/tasks chmod 0664 /dev/stune/rt/tasks + # cpuctl hierarchy for devices using utilclamp + mkdir /dev/cpuctl/foreground + mkdir /dev/cpuctl/background + mkdir /dev/cpuctl/top-app + mkdir /dev/cpuctl/rt + chown system system /dev/cpuctl + chown system system /dev/cpuctl/foreground + chown system system /dev/cpuctl/background + chown system system /dev/cpuctl/top-app + chown system system /dev/cpuctl/rt + chown system system /dev/cpuctl/tasks + chown system system /dev/cpuctl/foreground/tasks + chown system system /dev/cpuctl/background/tasks + chown system system /dev/cpuctl/top-app/tasks + chown system system /dev/cpuctl/rt/tasks + chmod 0664 /dev/cpuctl/tasks + chmod 0664 /dev/cpuctl/foreground/tasks + chmod 0664 /dev/cpuctl/background/tasks + chmod 0664 /dev/cpuctl/top-app/tasks + chmod 0664 /dev/cpuctl/rt/tasks + # Create an stune group for NNAPI HAL processes mkdir /dev/stune/nnapi-hal chown system system /dev/stune/nnapi-hal @@ -156,6 +177,14 @@ on init write /dev/stune/nnapi-hal/schedtune.boost 1 write /dev/stune/nnapi-hal/schedtune.prefer_idle 1 + # cpuctl hierarchy for devices using utilclamp + mkdir /dev/cpuctl/nnapi-hal + chown system system /dev/cpuctl/nnapi-hal + chown system system /dev/cpuctl/nnapi-hal/tasks + chmod 0664 /dev/cpuctl/nnapi-hal/tasks + write /dev/cpuctl/nnapi-hal/cpu.uclamp.min 1 + write /dev/cpuctl/nnapi-hal/cpu.uclamp.latency_sensitive 1 + # Create blkio group and apply initial settings. # This feature needs kernel to support it, and the # device's init.rc must actually set the correct values.