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: Iaaab0f99fee88f07cae5eae34f4c8224a429cc5e
  • Loading branch information
surenbaghdasaryan committed Oct 22, 2021
1 parent 5f852b9 commit 7e05d3b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmds/rss_hwm_reset/rss_hwm_reset.rc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ service rss_hwm_reset /system/bin/rss_hwm_reset
oneshot
user nobody
group nobody readproc
writepid /dev/cpuset/system-background/tasks
task_profiles ServiceCapacityLow
capabilities DAC_OVERRIDE

on property:sys.rss_hwm_reset.on=1
Expand Down
2 changes: 1 addition & 1 deletion cmds/servicemanager/servicemanager.rc
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ service servicemanager /system/bin/servicemanager
onrestart class_restart main
onrestart class_restart hal
onrestart class_restart early_hal
writepid /dev/cpuset/system-background/tasks
task_profiles ServiceCapacityLow
shutdown critical
2 changes: 1 addition & 1 deletion cmds/servicemanager/vndservicemanager.rc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ service vndservicemanager /vendor/bin/vndservicemanager /dev/vndbinder
class core
user system
group system readproc
writepid /dev/cpuset/system-background/tasks
task_profiles ServiceCapacityLow
onrestart class_restart main
onrestart class_restart hal
onrestart class_restart early_hal
Expand Down
2 changes: 1 addition & 1 deletion services/vr/virtual_touchpad/virtual_touchpad.rc
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ service virtual_touchpad /system/bin/virtual_touchpad
class core
user system
group system input uhid
writepid /dev/cpuset/system/tasks
task_profiles VrServiceCapacityNormal

0 comments on commit 7e05d3b

Please sign in to comment.