From 06b4b0ce139eea0e015184297cedbbbc9cf2d8d3 Mon Sep 17 00:00:00 2001 From: Wei Wang Date: Fri, 23 Jun 2017 14:48:37 -0700 Subject: [PATCH] init.hardware.rc: enable zram on boot_complete This help to save ~50ms in boot time and bootanim shown time Bug: 62957152 Test: Taimen boot and swap look normal after boot Change-Id: Idda2cc2aafca2f98f3c1faf4d1a08c7ae3203483 --- init.hardware.rc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/init.hardware.rc b/init.hardware.rc index cca92aa3..f9050a27 100644 --- a/init.hardware.rc +++ b/init.hardware.rc @@ -153,7 +153,6 @@ on fs symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice mount_all /vendor/etc/fstab.${ro.hardware} --early - swapon_all /vendor/etc/fstab.${ro.hardware} mkdir /persist/data 0700 system system mkdir /persist/display 0770 system graphics @@ -468,6 +467,10 @@ service per_proxy /vendor/bin/pm-proxy disabled on property:sys.boot_completed=1 + # Enable ZRAM on boot_complete + swapon_all /vendor/etc/fstab.${ro.hardware} + + # Setup final cpuset write /dev/cpuset/top-app/cpus 0-7 write /dev/cpuset/foreground/boost/cpus 0-3,6-7 write /dev/cpuset/foreground/cpus 0-3,6-7