Replace writepid with task_profiles command for cgroup migration
writepid command usage to join a cgroup has been deprecated in favor
of a more flexible approach using task_profiles. This way cgroup path
is not hardcoded and cgroup changes can be easily made. Replace
writepid with task_profiles command to migrate between cgroups.
Bug: 191283136
Test: build and boot
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I1f4c18c833644942a0c2119dd351a03bce38d4d2
diff --git a/logcat/logcatd.rc b/logcat/logcatd.rc
index 64d5500..eab4d78 100644
--- a/logcat/logcatd.rc
+++ b/logcat/logcatd.rc
@@ -58,5 +58,5 @@
# logd for write to /data/misc/logd, log group for read from log daemon
user logd
group log
- writepid /dev/cpuset/system-background/tasks
+ task_profiles ServiceCapacityLow
oom_score_adjust -600
diff --git a/logd/logd.rc b/logd/logd.rc
index 530f342..487eea1 100644
--- a/logd/logd.rc
+++ b/logd/logd.rc
@@ -8,14 +8,14 @@
group logd system package_info readproc
capabilities SYSLOG AUDIT_CONTROL
priority 10
- writepid /dev/cpuset/system-background/tasks
+ task_profiles ServiceCapacityLow
service logd-reinit /system/bin/logd --reinit
oneshot
disabled
user logd
group logd
- writepid /dev/cpuset/system-background/tasks
+ task_profiles ServiceCapacityLow
# Limit SELinux denial generation to 5/second
service logd-auditctl /system/bin/auditctl -r 5