Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
rootdir: init.rc: write default oom_adj before starting ueventd
Browse files Browse the repository at this point in the history
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: Dima Zavin <dima@android.com>
  • Loading branch information
Dima Zavin committed Nov 4, 2011
1 parent 4f7c084 commit 4a25390
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rootdir/init.rc
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,7 @@
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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4a25390

Please sign in to comment.