From 2079c5f0c96b796cdd476c462cd7fc14bc5d3601 Mon Sep 17 00:00:00 2001 From: Suren Baghdasaryan Date: Thu, 17 Jun 2021 19:17:24 -0700 Subject: [PATCH] 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 Change-Id: I945c634dfa7621437d8ea3981bce370d680b7371 --- debuggerd/tombstoned/tombstoned.rc | 2 +- gatekeeperd/gatekeeperd.rc | 2 +- llkd/llkd-debuggable.rc | 2 +- llkd/llkd.rc | 2 +- rootdir/init.zygote32.rc | 2 +- rootdir/init.zygote64.rc | 2 +- storaged/storaged.rc | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/debuggerd/tombstoned/tombstoned.rc b/debuggerd/tombstoned/tombstoned.rc index c39f4e4f2..fc43f4e5d 100644 --- a/debuggerd/tombstoned/tombstoned.rc +++ b/debuggerd/tombstoned/tombstoned.rc @@ -5,4 +5,4 @@ service tombstoned /system/bin/tombstoned socket tombstoned_crash seqpacket 0666 system system socket tombstoned_intercept seqpacket 0666 system system socket tombstoned_java_trace seqpacket 0666 system system - writepid /dev/cpuset/system-background/tasks + task_profiles ServiceCapacityLow diff --git a/gatekeeperd/gatekeeperd.rc b/gatekeeperd/gatekeeperd.rc index 8b126d588..f572b11e1 100644 --- a/gatekeeperd/gatekeeperd.rc +++ b/gatekeeperd/gatekeeperd.rc @@ -1,4 +1,4 @@ service gatekeeperd /system/bin/gatekeeperd /data/misc/gatekeeper class late_start user system - writepid /dev/cpuset/system-background/tasks + task_profiles ServiceCapacityLow diff --git a/llkd/llkd-debuggable.rc b/llkd/llkd-debuggable.rc index 4b11b1c7a..8697e9ae7 100644 --- a/llkd/llkd-debuggable.rc +++ b/llkd/llkd-debuggable.rc @@ -16,4 +16,4 @@ service llkd-1 /system/bin/llkd capabilities KILL IPC_LOCK SYS_PTRACE DAC_OVERRIDE SYS_ADMIN file /dev/kmsg w file /proc/sysrq-trigger w - writepid /dev/cpuset/system-background/tasks + task_profiles ServiceCapacityLow diff --git a/llkd/llkd.rc b/llkd/llkd.rc index b1f96a8f3..5d701fcc0 100644 --- a/llkd/llkd.rc +++ b/llkd/llkd.rc @@ -42,4 +42,4 @@ service llkd-0 /system/bin/llkd capabilities KILL IPC_LOCK file /dev/kmsg w file /proc/sysrq-trigger w - writepid /dev/cpuset/system-background/tasks + task_profiles ServiceCapacityLow diff --git a/rootdir/init.zygote32.rc b/rootdir/init.zygote32.rc index 9469a4873..0090841d6 100644 --- a/rootdir/init.zygote32.rc +++ b/rootdir/init.zygote32.rc @@ -12,5 +12,5 @@ service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-sys onrestart restart media onrestart restart netd onrestart restart wificond - writepid /dev/cpuset/foreground/tasks + task_profiles ProcessCapacityHigh critical window=${zygote.critical_window.minute:-off} target=zygote-fatal diff --git a/rootdir/init.zygote64.rc b/rootdir/init.zygote64.rc index 98dc0881f..63772bd11 100644 --- a/rootdir/init.zygote64.rc +++ b/rootdir/init.zygote64.rc @@ -12,5 +12,5 @@ service zygote /system/bin/app_process64 -Xzygote /system/bin --zygote --start-s onrestart restart media onrestart restart netd onrestart restart wificond - writepid /dev/cpuset/foreground/tasks + task_profiles ProcessCapacityHigh critical window=${zygote.critical_window.minute:-off} target=zygote-fatal diff --git a/storaged/storaged.rc b/storaged/storaged.rc index 0614fadd1..7085743fa 100644 --- a/storaged/storaged.rc +++ b/storaged/storaged.rc @@ -3,6 +3,6 @@ service storaged /system/bin/storaged capabilities DAC_READ_SEARCH priority 10 file /d/mmc0/mmc0:0001/ext_csd r - writepid /dev/cpuset/system-background/tasks + task_profiles ServiceCapacityLow user root group package_info