From 658ae90f699bd21ec8d79b18a34765ed5993c828 Mon Sep 17 00:00:00 2001 From: Tim Murray Date: Fri, 13 Apr 2018 10:15:49 -0700 Subject: cutils: add restricted cpuset Bug 78197570 Test: CTS Exempt-From-Owner-Approval: owner OOO, build cop says it's fine Change-Id: I6df972950b75a839caa463ae282ad000b959e8ae --- rootdir/init.rc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'rootdir/init.rc') 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 -- cgit v1.2.3