Skip to content
Snippets Groups Projects
Commit 4a253908 authored by Dima Zavin's avatar Dima Zavin
Browse files

rootdir: init.rc: write default oom_adj before starting ueventd


Otherwise, ueventd's oom_adj value would have been 0 and it could
easily get killed early during low memory events

Change-Id: I1adbd18c37215b26ae77e70f7b8dbd1e143fc2d4
Signed-off-by: default avatarDima Zavin <dima@android.com>
parent 4f7c0843
Branches
Tags
No related merge requests found
on early-init on early-init
# Set init and its forked children's oom_adj.
write /proc/1/oom_adj -16
start ueventd start ueventd
# create mountpoints # create mountpoints
...@@ -204,9 +207,6 @@ on boot ...@@ -204,9 +207,6 @@ on boot
chown root system /sys/module/lowmemorykiller/parameters/minfree chown root system /sys/module/lowmemorykiller/parameters/minfree
chmod 0664 /sys/module/lowmemorykiller/parameters/minfree chmod 0664 /sys/module/lowmemorykiller/parameters/minfree
# Set init and its forked children's oom_adj.
write /proc/1/oom_adj -16
# Tweak background writeout # Tweak background writeout
write /proc/sys/vm/dirty_expire_centisecs 200 write /proc/sys/vm/dirty_expire_centisecs 200
write /proc/sys/vm/dirty_background_ratio 5 write /proc/sys/vm/dirty_background_ratio 5
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment