Loading libprocessgroup/profiles/task_profiles.json +1 −1 Original line number Diff line number Diff line Loading @@ -100,7 +100,7 @@ "Params": { "Controller": "cpu", "Path": "" "Path": "system" } } ] Loading rootdir/init.rc +39 −10 Original line number Diff line number Diff line Loading @@ -153,21 +153,56 @@ on init mkdir /dev/cpuctl/background mkdir /dev/cpuctl/top-app mkdir /dev/cpuctl/rt mkdir /dev/cpuctl/system 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/system 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 chown system system /dev/cpuctl/system/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 chmod 0664 /dev/cpuctl/system/tasks # Create a cpu group for NNAPI HAL processes 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 # Android only use global RT throttling and doesn't use CONFIG_RT_GROUP_SCHED # for RT group throttling. These values here are just to make sure RT threads # can be migrated to those groups. These settings can be removed once we migrate # to GKI kernel. write /dev/cpuctl/cpu.rt_period_us 1000000 write /dev/cpuctl/cpu.rt_runtime_us 950000 # Surfaceflinger is in FG group so giving it a bit more write /dev/cpuctl/foreground/cpu.rt_runtime_us 450000 write /dev/cpuctl/foreground/cpu.rt_period_us 1000000 write /dev/cpuctl/background/cpu.rt_runtime_us 100000 write /dev/cpuctl/background/cpu.rt_period_us 1000000 write /dev/cpuctl/top-app/cpu.rt_runtime_us 100000 write /dev/cpuctl/top-app/cpu.rt_period_us 1000000 write /dev/cpuctl/rt/cpu.rt_runtime_us 100000 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_period_us 1000000 # Migrate root group to system subgroup copy_per_line /dev/cpuctl/tasks /dev/cpuctl/system/tasks # Create an stune group for NNAPI HAL processes mkdir /dev/stune/nnapi-hal Loading @@ -177,14 +212,6 @@ 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. Loading Loading @@ -302,8 +329,6 @@ on init chown system system /dev/cpuctl chown system system /dev/cpuctl/tasks chmod 0666 /dev/cpuctl/tasks write /dev/cpuctl/cpu.rt_period_us 1000000 write /dev/cpuctl/cpu.rt_runtime_us 950000 # sets up initial cpusets for ActivityManager # this ensures that the cpusets are present and usable, but the device's Loading Loading @@ -1151,3 +1176,7 @@ on userspace-reboot-resume on property:sys.boot_completed=1 && property:sys.init.userspace_reboot.in_progress=1 setprop sys.init.userspace_reboot.in_progress "" # Migrate tasks again in case kernel threads are created during boot on property:sys.boot_completed=1 copy_per_line /dev/cpuctl/tasks /dev/cpuctl/system/tasks Loading
libprocessgroup/profiles/task_profiles.json +1 −1 Original line number Diff line number Diff line Loading @@ -100,7 +100,7 @@ "Params": { "Controller": "cpu", "Path": "" "Path": "system" } } ] Loading
rootdir/init.rc +39 −10 Original line number Diff line number Diff line Loading @@ -153,21 +153,56 @@ on init mkdir /dev/cpuctl/background mkdir /dev/cpuctl/top-app mkdir /dev/cpuctl/rt mkdir /dev/cpuctl/system 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/system 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 chown system system /dev/cpuctl/system/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 chmod 0664 /dev/cpuctl/system/tasks # Create a cpu group for NNAPI HAL processes 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 # Android only use global RT throttling and doesn't use CONFIG_RT_GROUP_SCHED # for RT group throttling. These values here are just to make sure RT threads # can be migrated to those groups. These settings can be removed once we migrate # to GKI kernel. write /dev/cpuctl/cpu.rt_period_us 1000000 write /dev/cpuctl/cpu.rt_runtime_us 950000 # Surfaceflinger is in FG group so giving it a bit more write /dev/cpuctl/foreground/cpu.rt_runtime_us 450000 write /dev/cpuctl/foreground/cpu.rt_period_us 1000000 write /dev/cpuctl/background/cpu.rt_runtime_us 100000 write /dev/cpuctl/background/cpu.rt_period_us 1000000 write /dev/cpuctl/top-app/cpu.rt_runtime_us 100000 write /dev/cpuctl/top-app/cpu.rt_period_us 1000000 write /dev/cpuctl/rt/cpu.rt_runtime_us 100000 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_period_us 1000000 # Migrate root group to system subgroup copy_per_line /dev/cpuctl/tasks /dev/cpuctl/system/tasks # Create an stune group for NNAPI HAL processes mkdir /dev/stune/nnapi-hal Loading @@ -177,14 +212,6 @@ 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. Loading Loading @@ -302,8 +329,6 @@ on init chown system system /dev/cpuctl chown system system /dev/cpuctl/tasks chmod 0666 /dev/cpuctl/tasks write /dev/cpuctl/cpu.rt_period_us 1000000 write /dev/cpuctl/cpu.rt_runtime_us 950000 # sets up initial cpusets for ActivityManager # this ensures that the cpusets are present and usable, but the device's Loading Loading @@ -1151,3 +1176,7 @@ on userspace-reboot-resume on property:sys.boot_completed=1 && property:sys.init.userspace_reboot.in_progress=1 setprop sys.init.userspace_reboot.in_progress "" # Migrate tasks again in case kernel threads are created during boot on property:sys.boot_completed=1 copy_per_line /dev/cpuctl/tasks /dev/cpuctl/system/tasks