diff --git a/rootdir/init.rc b/rootdir/init.rc index 2b1a97c25..8ea72e833 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -143,14 +143,20 @@ on init mkdir /dev/cpuset/foreground mkdir /dev/cpuset/foreground/boost mkdir /dev/cpuset/background + # 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 the permissions + mkdir /dev/cpuset/system-background # this ensures that the cpusets are present and usable, but the device's # init.rc must actually set the correct cpus write /dev/cpuset/foreground/cpus 0 write /dev/cpuset/foreground/boost/cpus 0 write /dev/cpuset/background/cpus 0 + write /dev/cpuset/system-background/cpus 0 write /dev/cpuset/foreground/mems 0 write /dev/cpuset/foreground/boost/mems 0 write /dev/cpuset/background/mems 0 + write /dev/cpuset/system-background/mems 0 chown system system /dev/cpuset chown system system /dev/cpuset/foreground chown system system /dev/cpuset/foreground/boost @@ -548,9 +554,11 @@ service logd /system/bin/logd socket logdr seqpacket 0666 logd logd socket logdw dgram 0222 logd logd group root system + writepid /dev/cpuset/system-background/tasks service logd-reinit /system/bin/logd --reinit oneshot + writepid /dev/cpuset/system-background/tasks disabled service healthd /sbin/healthd @@ -585,6 +593,7 @@ service lmkd /system/bin/lmkd class core critical socket lmkd seqpacket 0660 system system + writepid /dev/cpuset/system-background/tasks service servicemanager /system/bin/servicemanager class core @@ -614,9 +623,11 @@ service netd /system/bin/netd service debuggerd /system/bin/debuggerd class main + writepid /dev/cpuset/system-background/tasks service debuggerd64 /system/bin/debuggerd64 class main + writepid /dev/cpuset/system-background/tasks service ril-daemon /system/bin/rild class main @@ -631,6 +642,7 @@ service surfaceflinger /system/bin/surfaceflinger user system group graphics drmrpc onrestart restart zygote + writepid /dev/cpuset/system-background/tasks service drm /system/bin/drmserver class main @@ -725,6 +737,7 @@ service perfprofd /system/xbin/perfprofd class late_start user root oneshot + writepid /dev/cpuset/system-background/tasks on property:persist.logd.logpersistd=logcatd # all exec/services are called with umask(077), so no gain beyond 0700 @@ -739,3 +752,4 @@ service logcatd /system/bin/logcat -b all -v threadtime -v usec -v printable -D # logd for write to /data/misc/logd, log group for read from log daemon user logd group log + writepid /dev/cpuset/system-background/tasks