Skip to content

Commit

Permalink
Replace writepid with task_profiles command for cgroup migration
Browse files Browse the repository at this point in the history
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 <[email protected]>
Change-Id: I945c634dfa7621437d8ea3981bce370d680b7371
  • Loading branch information
surenbaghdasaryan committed Jun 24, 2021
1 parent 56a05e1 commit 2079c5f
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion debuggerd/tombstoned/tombstoned.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion gatekeeperd/gatekeeperd.rc
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion llkd/llkd-debuggable.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion llkd/llkd.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion rootdir/init.zygote32.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion rootdir/init.zygote64.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion storaged/storaged.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 2079c5f

Please sign in to comment.