summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuren Baghdasaryan <surenb@google.com>2021-06-17 19:18:40 -0700
committerSuren Baghdasaryan <surenb@google.com>2021-06-23 18:42:41 +0000
commitf7b663bdac56392330133a47ac700ca1ad464c7e (patch)
tree5e3b200da6d4716dd3dd6c08fc86675600cb6817
parent7baf903ea86064be9a423573367b340ab85ea974 (diff)
downloadextras-f7b663bdac56392330133a47ac700ca1ad464c7e.tar.gz
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: I031082aaf469e30320f89fd320991318384fc48b
-rw-r--r--cppreopts/cppreopts.rc2
-rw-r--r--profcollectd/profcollectd.rc2
2 files changed, 2 insertions, 2 deletions
diff --git a/cppreopts/cppreopts.rc b/cppreopts/cppreopts.rc
index a7f69445..b099e666 100644
--- a/cppreopts/cppreopts.rc
+++ b/cppreopts/cppreopts.rc
@@ -18,7 +18,7 @@ service cppreopts /system/bin/cppreopts.sh /postinstall
user root
priority -20
ioprio rt 0
- writepid /dev/cpuset/foreground/tasks
+ task_profiles ProcessCapacityHigh
capabilities
# Post install is above Treble VINTF, because it runs some utilities from
diff --git a/profcollectd/profcollectd.rc b/profcollectd/profcollectd.rc
index d1dbd9ef..c8b79558 100644
--- a/profcollectd/profcollectd.rc
+++ b/profcollectd/profcollectd.rc
@@ -4,7 +4,7 @@ service profcollectd /system/bin/profcollectd
oneshot
user root
group root wakelock
- writepid /dev/cpuset/system-background/tasks
+ task_profiles ServiceCapacityLow
on property:persist.device_config.profcollect_native_boot.enabled=true
start profcollectd