From 2e83b86a8a10c825799062770ed8c85878e5b4e1 Mon Sep 17 00:00:00 2001 From: Wei Wang Date: Thu, 13 Apr 2017 18:27:35 -0700 Subject: [PATCH] init.rc: set initial cpuset to all cores Starting zygote early requires cpuset to be initialized to all cores for foreground cpuset. Change to expolit all cores by default at boot and let device manufacturers override to proper values in device specific init script. Bug: 36576280 Test: marlin boot fast and checked cpuset during early boot Change-Id: I2c1ce0630e58a7b04d1a453c6740d3f0bce9de9f --- rootdir/init.rc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/rootdir/init.rc b/rootdir/init.rc index 17dade4ed..6675e944a 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -157,25 +157,25 @@ on init # this ensures that the cpusets are present and usable, but the device's # init.rc must actually set the correct cpus mkdir /dev/cpuset/foreground - write /dev/cpuset/foreground/cpus 0 - write /dev/cpuset/foreground/mems 0 + copy /dev/cpuset/cpus /dev/cpuset/foreground/cpus + copy /dev/cpuset/mems /dev/cpuset/foreground/mems mkdir /dev/cpuset/foreground/boost - write /dev/cpuset/foreground/boost/cpus 0 - write /dev/cpuset/foreground/boost/mems 0 + copy /dev/cpuset/cpus /dev/cpuset/foreground/boost/cpus + copy /dev/cpuset/mems /dev/cpuset/foreground/boost/mems mkdir /dev/cpuset/background - write /dev/cpuset/background/cpus 0 - write /dev/cpuset/background/mems 0 + copy /dev/cpuset/cpus /dev/cpuset/background/cpus + copy /dev/cpuset/mems /dev/cpuset/background/mems # system-background is for system tasks that should only run on # little cores, not on bigs # to be used only by init, so don't change system-bg permissions mkdir /dev/cpuset/system-background - write /dev/cpuset/system-background/cpus 0 - write /dev/cpuset/system-background/mems 0 + copy /dev/cpuset/cpus /dev/cpuset/system-background/cpus + copy /dev/cpuset/mems /dev/cpuset/system-background/mems mkdir /dev/cpuset/top-app - write /dev/cpuset/top-app/cpus 0 - write /dev/cpuset/top-app/mems 0 + copy /dev/cpuset/cpus /dev/cpuset/top-app/cpus + copy /dev/cpuset/mems /dev/cpuset/top-app/mems # change permissions for all cpusets we'll touch at runtime chown system system /dev/cpuset