summaryrefslogtreecommitdiff
path: root/rootdir/init.rc
diff options
context:
space:
mode:
authorMartijn Coenen <maco@google.com>2016-02-02 10:23:57 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2016-02-02 10:23:57 +0000
commit2f076739576ca7ca2d13fac77bf80af3add584e6 (patch)
treeb0ed0883512ec6d35b87aa9c2eae68be6c6c8453 /rootdir/init.rc
parent699709c593e3a4a233a3e33439156f357d4dcab5 (diff)
parentb82bab66f318896ebad80c1feee2347c58e3ce37 (diff)
Merge "Reuse mem cgroups for tracking forked PIDs."
Diffstat (limited to 'rootdir/init.rc')
-rw-r--r--rootdir/init.rc17
1 files changed, 3 insertions, 14 deletions
diff --git a/rootdir/init.rc b/rootdir/init.rc
index ee216faf6..21ecb5a74 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -43,19 +43,6 @@ on init
mount cgroup none /acct cpuacct
mkdir /acct/uid
- # Create cgroup mount point for memory
- mount tmpfs none /sys/fs/cgroup mode=0750,uid=0,gid=1000
- mkdir /sys/fs/cgroup/memory 0750 root system
- mount cgroup none /sys/fs/cgroup/memory memory
- write /sys/fs/cgroup/memory/memory.move_charge_at_immigrate 1
- chown root system /sys/fs/cgroup/memory/tasks
- chmod 0660 /sys/fs/cgroup/memory/tasks
- mkdir /sys/fs/cgroup/memory/sw 0750 root system
- write /sys/fs/cgroup/memory/sw/memory.swappiness 100
- write /sys/fs/cgroup/memory/sw/memory.move_charge_at_immigrate 1
- chown root system /sys/fs/cgroup/memory/sw/tasks
- chmod 0660 /sys/fs/cgroup/memory/sw/tasks
-
# Create energy-aware scheduler tuning nodes
mkdir /sys/fs/cgroup/stune
mount cgroup none /sys/fs/cgroup/stune schedtune
@@ -95,9 +82,11 @@ on init
symlink /storage/self/primary /sdcard
symlink /mnt/user/0/primary /mnt/runtime/default/self/primary
- # memory control cgroup
+ # root memory control cgroup, used by lmkd
mkdir /dev/memcg 0700 root system
mount cgroup none /dev/memcg memory
+ # app mem cgroups, used by activity manager and lmkd
+ mkdir /dev/memcg/apps/ 0755 system system
write /proc/sys/kernel/panic_on_oops 1
write /proc/sys/kernel/hung_task_timeout_secs 0