|
diff --git a/rootdir/init.rc b/rootdir/init.rc |
|
index b9464e7fd..e90c58f79 100644 |
|
--- a/rootdir/init.rc |
|
+++ b/rootdir/init.rc |
|
@@ -158,33 +158,25 @@ on init |
|
|
|
# sets up initial cpusets for ActivityManager |
|
mkdir /dev/cpuset |
|
- mount cpuset none /dev/cpuset nodev noexec nosuid |
|
+ mount cpuset none /dev/cpuset nodev noexec nosuid cpuset |
|
+ write /dev/cpuset/cgroup.clone_children 1 |
|
|
|
# this ensures that the cpusets are present and usable, but the device's |
|
# init.rc must actually set the correct cpus |
|
mkdir /dev/cpuset/foreground |
|
- copy /dev/cpuset/cpus /dev/cpuset/foreground/cpus |
|
- copy /dev/cpuset/mems /dev/cpuset/foreground/mems |
|
mkdir /dev/cpuset/background |
|
- copy /dev/cpuset/cpus /dev/cpuset/background/cpus |
|
- copy /dev/cpuset/mems /dev/cpuset/background/mems |
|
|
|
# system-background is for system tasks that should only run on |
|
# little cores, not on bigs |
|
# to be used only by init, so don't change system-bg permissions |
|
mkdir /dev/cpuset/system-background |
|
- 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 |
|
+ mkdir /dev/cpuset/camera-daemon |
|
|
|
# change permissions for all cpusets we'll touch at runtime |
|
chown system system /dev/cpuset |
|
@@ -199,6 +191,8 @@ on init |
|
chown system system /dev/cpuset/system-background/tasks |
|
chown system system /dev/cpuset/top-app/tasks |
|
chown system system /dev/cpuset/restricted/tasks |
|
+ chown system system /dev/cpuset/camera-daemon |
|
+ chown system system /dev/cpuset/camera-daemon/tasks |
|
|
|
# set system-background to 0775 so SurfaceFlinger can touch it |
|
chmod 0775 /dev/cpuset/system-background |
|
@@ -209,7 +203,26 @@ on init |
|
chmod 0664 /dev/cpuset/top-app/tasks |
|
chmod 0664 /dev/cpuset/restricted/tasks |
|
chmod 0664 /dev/cpuset/tasks |
|
- |
|
+ chmod 0664 /dev/cpuset/camera-daemon/tasks |
|
+ |
|
+ # mount cgroup subsystems in /sys/fs/cgroup |
|
+ mount tmpfs cgroup_root /sys/fs/cgroup |
|
+ mkdir /sys/fs/cgroup/cpu |
|
+ mkdir /sys/fs/cgroup/cpuacct |
|
+ mkdir /sys/fs/cgroup/cpuset |
|
+ mkdir /sys/fs/cgroup/memory |
|
+ mkdir /sys/fs/cgroup/pids |
|
+ mkdir /sys/fs/cgroup/devices |
|
+ mkdir /sys/fs/cgroup/freezer |
|
+ mkdir /sys/fs/cgroup/blkio |
|
+ mount cgroup none /sys/fs/cgroup/cpu nodev noexec nosuid cpu |
|
+ mount cgroup none /sys/fs/cgroup/cpuacct nodev noexec nosuid cpuacct |
|
+ mount cpuset none /sys/fs/cgroup/cpuset nodev noexec nosuid cpuset |
|
+ mount cgroup none /sys/fs/cgroup/memory nodev noexec nosuid memory |
|
+ mount cgroup none /sys/fs/cgroup/pids nodev noexec nosuid pids |
|
+ mount cgroup none /sys/fs/cgroup/devices nodev noexec nosuid devices |
|
+ mount cgroup none /sys/fs/cgroup/freezer nodev noexec nosuid freezer |
|
+ mount cgroup none /sys/fs/cgroup/blkio nodev noexec nosuid blkio |
|
|
|
# qtaguid will limit access to specific data based on group memberships. |
|
# net_bw_acct grants impersonation of socket owners. |
This may be helpful