summaryrefslogtreecommitdiff
path: root/init.common.rc
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2016-12-19 17:38:31 +0800
committerYongqin Liu <yongqin.liu@linaro.org>2017-04-22 09:55:30 +0800
commit8fd6c4f253d6410180888937950fea9ece1b4a18 (patch)
tree4ec817ca2ab60f155c6dd8765db64e6eead5e4e8 /init.common.rc
parentcb9d097082ffd71eb220d5af435e5d7f8cddd465 (diff)
downloadhikey-8fd6c4f253d6410180888937950fea9ece1b4a18.tar.gz
init.common.rc: set cpuset with sys.boot_completed=1
In the aosp common init.rc file, all cpusets are initialized to use all cpu cores here: https://android-review.googlesource.com/#/c/373574/ And to help to make boot much faster, need to keep to use all cpu cores till the boot completed. btw, put the "on post-fs-data" after "on post-fs" as well Test: manual with hikey, the average(from 10 times) android boot time is about 0.8s faster. The measurement is taken from lines like "Boot is finished (17288 ms)" from logcat Change-Id: I42b42c1b8af717ab305fcbdb939404725f6bd88a Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Diffstat (limited to 'init.common.rc')
-rw-r--r--init.common.rc45
1 files changed, 23 insertions, 22 deletions
diff --git a/init.common.rc b/init.common.rc
index 11bc6759..8d7a35d3 100644
--- a/init.common.rc
+++ b/init.common.rc
@@ -15,12 +15,6 @@ on fs
mount_all /fstab.${ro.hardware}
setprop ro.crypto.fuse_sdcard false
-on post-fs-data
- mkdir /data/media 0770 media_rw media_rw
- mkdir /data/misc/gatord 0700 root root
- # Set SELinux security contexts for files used by lava.
- restorecon_recursive /data/local/tmp/lava
-
on post-fs
# For legacy support
@@ -47,22 +41,6 @@ on post-fs
# Set supported opengles version
setprop ro.opengles.version 196608
- # update cpuset now that processors are up
- # Foreground should contain most cores (7 is reserved for top-app)
- write /dev/cpuset/foreground/cpus 0-6
-
- # top-app gets all cpus (including reserved #7)
- write /dev/cpuset/top-app/cpus 0-7
-
- #background contains a small subset (generally one little core)
- write /dev/cpuset/background/cpus 0
-
- # add system-background cpuset, a new cpuset for system services
- # that should not run on larger cores
- # system-background is for system tasks that should only run on
- # little cores, not on bigs to be used only by init
- write /dev/cpuset/system-background/cpus 0-3
-
#
# EAS stune boosting interfaces
#
@@ -86,6 +64,29 @@ on post-fs
# enable test harness
setprop ro.test_harness true
+on post-fs-data
+ mkdir /data/media 0770 media_rw media_rw
+ mkdir /data/misc/gatord 0700 root root
+ # Set SELinux security contexts for files used by lava.
+ restorecon_recursive /data/local/tmp/lava
+
+on property:sys.boot_completed=1
+ # update cpuset now that processors are up
+ # Foreground should contain most cores (7 is reserved for top-app)
+ write /dev/cpuset/foreground/cpus 0-6
+
+ # top-app gets all cpus (including reserved #7)
+ write /dev/cpuset/top-app/cpus 0-7
+
+ #background contains a small subset (generally one little core)
+ write /dev/cpuset/background/cpus 0
+
+ # add system-background cpuset, a new cpuset for system services
+ # that should not run on larger cores
+ # system-background is for system tasks that should only run on
+ # little cores, not on bigs to be used only by init
+ write /dev/cpuset/system-background/cpus 0-3
+
on property:usb_speed.switch=high
write /sys/kernel/debug/f72c0000.usb/config "0"