diff options
author | Tim Murray <timmurray@google.com> | 2018-04-13 10:15:49 -0700 |
---|---|---|
committer | Tim Murray <timmurray@google.com> | 2018-04-18 16:42:12 -0700 |
commit | 658ae90f699bd21ec8d79b18a34765ed5993c828 (patch) | |
tree | e33a75c65f54348a83925d94626aebe2e2567cd2 /rootdir/init.rc | |
parent | e58d713e47bc798a546c3d2a2c40e2339527133d (diff) | |
download | system_core-658ae90f699bd21ec8d79b18a34765ed5993c828.tar.gz system_core-658ae90f699bd21ec8d79b18a34765ed5993c828.tar.bz2 system_core-658ae90f699bd21ec8d79b18a34765ed5993c828.zip |
cutils: add restricted cpuset
Bug 78197570
Test: CTS
Exempt-From-Owner-Approval: owner OOO, build cop says it's fine
Change-Id: I6df972950b75a839caa463ae282ad000b959e8ae
Diffstat (limited to 'rootdir/init.rc')
-rw-r--r-- | rootdir/init.rc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/rootdir/init.rc b/rootdir/init.rc index d75b9efbd..5b06fdb19 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -176,6 +176,12 @@ on init copy /dev/cpuset/cpus /dev/cpuset/system-background/cpus copy /dev/cpuset/mems /dev/cpuset/system-background/mems + # restricted is for system tasks that are being throttled + # due to screen off. + mkdir /dev/cpuset/restricted + copy /dev/cpuset/cpus /dev/cpuset/restricted/cpus + copy /dev/cpuset/mems /dev/cpuset/restricted/mems + mkdir /dev/cpuset/top-app copy /dev/cpuset/cpus /dev/cpuset/top-app/cpus copy /dev/cpuset/mems /dev/cpuset/top-app/mems @@ -186,11 +192,13 @@ on init chown system system /dev/cpuset/background chown system system /dev/cpuset/system-background chown system system /dev/cpuset/top-app + chown system system /dev/cpuset/restricted chown system system /dev/cpuset/tasks chown system system /dev/cpuset/foreground/tasks chown system system /dev/cpuset/background/tasks chown system system /dev/cpuset/system-background/tasks chown system system /dev/cpuset/top-app/tasks + chown system system /dev/cpuset/restricted/tasks # set system-background to 0775 so SurfaceFlinger can touch it chmod 0775 /dev/cpuset/system-background @@ -199,6 +207,7 @@ on init chmod 0664 /dev/cpuset/background/tasks chmod 0664 /dev/cpuset/system-background/tasks chmod 0664 /dev/cpuset/top-app/tasks + chmod 0664 /dev/cpuset/restricted/tasks chmod 0664 /dev/cpuset/tasks |