system/core
Revision | b42da457425cf0941d6ea68916ba48fc0f7516ba (tree) |
---|---|
Zeit | 2018-06-13 17:15:27 |
Autor | Wei Wang <wvw@goog...> |
Commiter | Chih-Wei Huang |
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
@@ -158,25 +158,25 @@ on init | ||
158 | 158 | # this ensures that the cpusets are present and usable, but the device's |
159 | 159 | # init.rc must actually set the correct cpus |
160 | 160 | mkdir /dev/cpuset/foreground |
161 | - write /dev/cpuset/foreground/cpus 0 | |
162 | - write /dev/cpuset/foreground/mems 0 | |
161 | + copy /dev/cpuset/cpus /dev/cpuset/foreground/cpus | |
162 | + copy /dev/cpuset/mems /dev/cpuset/foreground/mems | |
163 | 163 | mkdir /dev/cpuset/foreground/boost |
164 | - write /dev/cpuset/foreground/boost/cpus 0 | |
165 | - write /dev/cpuset/foreground/boost/mems 0 | |
164 | + copy /dev/cpuset/cpus /dev/cpuset/foreground/boost/cpus | |
165 | + copy /dev/cpuset/mems /dev/cpuset/foreground/boost/mems | |
166 | 166 | mkdir /dev/cpuset/background |
167 | - write /dev/cpuset/background/cpus 0 | |
168 | - write /dev/cpuset/background/mems 0 | |
167 | + copy /dev/cpuset/cpus /dev/cpuset/background/cpus | |
168 | + copy /dev/cpuset/mems /dev/cpuset/background/mems | |
169 | 169 | |
170 | 170 | # system-background is for system tasks that should only run on |
171 | 171 | # little cores, not on bigs |
172 | 172 | # to be used only by init, so don't change system-bg permissions |
173 | 173 | mkdir /dev/cpuset/system-background |
174 | - write /dev/cpuset/system-background/cpus 0 | |
175 | - write /dev/cpuset/system-background/mems 0 | |
174 | + copy /dev/cpuset/cpus /dev/cpuset/system-background/cpus | |
175 | + copy /dev/cpuset/mems /dev/cpuset/system-background/mems | |
176 | 176 | |
177 | 177 | mkdir /dev/cpuset/top-app |
178 | - write /dev/cpuset/top-app/cpus 0 | |
179 | - write /dev/cpuset/top-app/mems 0 | |
178 | + copy /dev/cpuset/cpus /dev/cpuset/top-app/cpus | |
179 | + copy /dev/cpuset/mems /dev/cpuset/top-app/mems | |
180 | 180 | |
181 | 181 | # change permissions for all cpusets we'll touch at runtime |
182 | 182 | chown system system /dev/cpuset |