diff --git a/debuggerd/debuggerd.rc b/debuggerd/debuggerd.rc index 4338ae92b..4be2e5d08 100644 --- a/debuggerd/debuggerd.rc +++ b/debuggerd/debuggerd.rc @@ -1,2 +1,3 @@ service debuggerd /system/bin/debuggerd class main + writepid /dev/cpuset/system-background/tasks diff --git a/debuggerd/debuggerd64.rc b/debuggerd/debuggerd64.rc index 341a3296d..c6e7bf2a5 100644 --- a/debuggerd/debuggerd64.rc +++ b/debuggerd/debuggerd64.rc @@ -1,2 +1,3 @@ service debuggerd64 /system/bin/debuggerd64 class main + writepid /dev/cpuset/system-background/tasks diff --git a/lmkd/lmkd.rc b/lmkd/lmkd.rc index 83c5ff0f9..7d6cb11ba 100644 --- a/lmkd/lmkd.rc +++ b/lmkd/lmkd.rc @@ -2,3 +2,4 @@ service lmkd /system/bin/lmkd class core critical socket lmkd seqpacket 0660 system system + writepid /dev/cpuset/system-background/tasks diff --git a/logcat/logcatd.rc b/logcat/logcatd.rc index 0bc581e91..173d3919a 100644 --- a/logcat/logcatd.rc +++ b/logcat/logcatd.rc @@ -11,3 +11,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 diff --git a/logd/logd.rc b/logd/logd.rc index da6a0bcd0..ecd2f0acf 100644 --- a/logd/logd.rc +++ b/logd/logd.rc @@ -4,7 +4,9 @@ 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 disabled + writepid /dev/cpuset/system-background/tasks diff --git a/rootdir/init.rc b/rootdir/init.rc index 52d670027..55e377642 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -138,14 +138,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