From dd50b2f45d2f176f18c52aac08fb400a76b18547 Mon Sep 17 00:00:00 2001 From: Suren Baghdasaryan Date: Thu, 17 Jun 2021 18:58:30 -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: I249ecc45a001a69d73b06b77154f9b6e5f9964d9 --- .../1.0/default/android.hardware.biometrics.face@1.0-service.rc | 2 +- .../android.hardware.biometrics.fingerprint@2.1-service.rc | 2 +- cas/1.0/default/android.hardware.cas@1.0-service-lazy.rc | 2 +- cas/1.0/default/android.hardware.cas@1.0-service.rc | 2 +- cas/1.1/default/android.hardware.cas@1.1-service-lazy.rc | 2 +- cas/1.1/default/android.hardware.cas@1.1-service.rc | 2 +- cas/1.2/default/android.hardware.cas@1.2-service-lazy.rc | 2 +- cas/1.2/default/android.hardware.cas@1.2-service.rc | 2 +- drm/1.0/default/android.hardware.drm@1.0-service-lazy.rc | 2 +- drm/1.0/default/android.hardware.drm@1.0-service.rc | 2 +- .../default/android.hardware.graphics.composer@2.1-service.rc | 2 +- .../default/android.hardware.graphics.composer@2.2-service.rc | 2 +- .../default/android.hardware.graphics.composer@2.3-service.rc | 2 +- .../default/android.hardware.graphics.composer@2.4-service.rc | 2 +- .../multihal/android.hardware.sensors@2.0-service-multihal.rc | 2 +- .../multihal/android.hardware.sensors@2.1-service-multihal.rc | 2 +- .../1.0/default/android.hardware.tv.tuner@1.0-service-lazy.rc | 2 +- tv/tuner/1.0/default/android.hardware.tv.tuner@1.0-service.rc | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/biometrics/face/1.0/default/android.hardware.biometrics.face@1.0-service.rc b/biometrics/face/1.0/default/android.hardware.biometrics.face@1.0-service.rc index 6c7362f2bb..3fb827d63a 100644 --- a/biometrics/face/1.0/default/android.hardware.biometrics.face@1.0-service.rc +++ b/biometrics/face/1.0/default/android.hardware.biometrics.face@1.0-service.rc @@ -5,6 +5,6 @@ service vendor.face-hal-1-0-default /vendor/bin/hw/android.hardware.biometrics.f class late_start user system group system - writepid /dev/cpuset/foreground/tasks + task_profiles ProcessCapacityHigh capabilities SYS_NICE rlimit rtprio 10 10 diff --git a/biometrics/fingerprint/2.1/default/android.hardware.biometrics.fingerprint@2.1-service.rc b/biometrics/fingerprint/2.1/default/android.hardware.biometrics.fingerprint@2.1-service.rc index 1667677bfe..e7e8d30bf5 100644 --- a/biometrics/fingerprint/2.1/default/android.hardware.biometrics.fingerprint@2.1-service.rc +++ b/biometrics/fingerprint/2.1/default/android.hardware.biometrics.fingerprint@2.1-service.rc @@ -5,4 +5,4 @@ service vendor.fps_hal /vendor/bin/hw/android.hardware.biometrics.fingerprint@2. class late_start user system group system input uhid - writepid /dev/cpuset/system-background/tasks + task_profiles ServiceCapacityLow diff --git a/cas/1.0/default/android.hardware.cas@1.0-service-lazy.rc b/cas/1.0/default/android.hardware.cas@1.0-service-lazy.rc index 443549a062..622ee8f6cd 100644 --- a/cas/1.0/default/android.hardware.cas@1.0-service-lazy.rc +++ b/cas/1.0/default/android.hardware.cas@1.0-service-lazy.rc @@ -6,4 +6,4 @@ service vendor.cas-hal-1-0 /vendor/bin/hw/android.hardware.cas@1.0-service-lazy user media group mediadrm drmrpc ioprio rt 4 - writepid /dev/cpuset/foreground/tasks + task_profiles ProcessCapacityHigh diff --git a/cas/1.0/default/android.hardware.cas@1.0-service.rc b/cas/1.0/default/android.hardware.cas@1.0-service.rc index 74f2f9676e..5df4825239 100644 --- a/cas/1.0/default/android.hardware.cas@1.0-service.rc +++ b/cas/1.0/default/android.hardware.cas@1.0-service.rc @@ -3,4 +3,4 @@ service vendor.cas-hal-1-0 /vendor/bin/hw/android.hardware.cas@1.0-service user media group mediadrm drmrpc ioprio rt 4 - writepid /dev/cpuset/foreground/tasks + task_profiles ProcessCapacityHigh diff --git a/cas/1.1/default/android.hardware.cas@1.1-service-lazy.rc b/cas/1.1/default/android.hardware.cas@1.1-service-lazy.rc index 73c505d351..0721dc38f3 100644 --- a/cas/1.1/default/android.hardware.cas@1.1-service-lazy.rc +++ b/cas/1.1/default/android.hardware.cas@1.1-service-lazy.rc @@ -7,4 +7,4 @@ service vendor.cas-hal-1-1 /vendor/bin/hw/android.hardware.cas@1.1-service-lazy user media group mediadrm drmrpc ioprio rt 4 - writepid /dev/cpuset/foreground/tasks + task_profiles ProcessCapacityHigh diff --git a/cas/1.1/default/android.hardware.cas@1.1-service.rc b/cas/1.1/default/android.hardware.cas@1.1-service.rc index 4081fe1e64..132d943e18 100644 --- a/cas/1.1/default/android.hardware.cas@1.1-service.rc +++ b/cas/1.1/default/android.hardware.cas@1.1-service.rc @@ -3,4 +3,4 @@ service vendor.cas-hal-1-1 /vendor/bin/hw/android.hardware.cas@1.1-service user media group mediadrm drmrpc ioprio rt 4 - writepid /dev/cpuset/foreground/tasks + task_profiles ProcessCapacityHigh diff --git a/cas/1.2/default/android.hardware.cas@1.2-service-lazy.rc b/cas/1.2/default/android.hardware.cas@1.2-service-lazy.rc index 1c7510030b..d91fdcecfa 100644 --- a/cas/1.2/default/android.hardware.cas@1.2-service-lazy.rc +++ b/cas/1.2/default/android.hardware.cas@1.2-service-lazy.rc @@ -8,4 +8,4 @@ service vendor.cas-hal-1-2 /vendor/bin/hw/android.hardware.cas@1.2-service-lazy user media group mediadrm drmrpc ioprio rt 4 - writepid /dev/cpuset/foreground/tasks + task_profiles ProcessCapacityHigh diff --git a/cas/1.2/default/android.hardware.cas@1.2-service.rc b/cas/1.2/default/android.hardware.cas@1.2-service.rc index d1c853e40f..b22971a259 100644 --- a/cas/1.2/default/android.hardware.cas@1.2-service.rc +++ b/cas/1.2/default/android.hardware.cas@1.2-service.rc @@ -3,4 +3,4 @@ service vendor.cas-hal-1-2 /vendor/bin/hw/android.hardware.cas@1.2-service user media group mediadrm drmrpc ioprio rt 4 - writepid /dev/cpuset/foreground/tasks + task_profiles ProcessCapacityHigh diff --git a/drm/1.0/default/android.hardware.drm@1.0-service-lazy.rc b/drm/1.0/default/android.hardware.drm@1.0-service-lazy.rc index 4b32f7f1f3..e5ae5cddea 100644 --- a/drm/1.0/default/android.hardware.drm@1.0-service-lazy.rc +++ b/drm/1.0/default/android.hardware.drm@1.0-service-lazy.rc @@ -7,4 +7,4 @@ service vendor.drm-hal-1-0 /vendor/bin/hw/android.hardware.drm@1.0-service-lazy user media group mediadrm drmrpc ioprio rt 4 - writepid /dev/cpuset/foreground/tasks + task_profiles ProcessCapacityHigh diff --git a/drm/1.0/default/android.hardware.drm@1.0-service.rc b/drm/1.0/default/android.hardware.drm@1.0-service.rc index 790ededbe7..2aba187058 100644 --- a/drm/1.0/default/android.hardware.drm@1.0-service.rc +++ b/drm/1.0/default/android.hardware.drm@1.0-service.rc @@ -5,4 +5,4 @@ service vendor.drm-hal-1-0 /vendor/bin/hw/android.hardware.drm@1.0-service user media group mediadrm drmrpc ioprio rt 4 - writepid /dev/cpuset/foreground/tasks + task_profiles ProcessCapacityHigh diff --git a/graphics/composer/2.1/default/android.hardware.graphics.composer@2.1-service.rc b/graphics/composer/2.1/default/android.hardware.graphics.composer@2.1-service.rc index cbd589afca..c8fccdce20 100644 --- a/graphics/composer/2.1/default/android.hardware.graphics.composer@2.1-service.rc +++ b/graphics/composer/2.1/default/android.hardware.graphics.composer@2.1-service.rc @@ -5,4 +5,4 @@ service vendor.hwcomposer-2-1 /vendor/bin/hw/android.hardware.graphics.composer@ group graphics drmrpc capabilities SYS_NICE onrestart restart surfaceflinger - writepid /dev/cpuset/system-background/tasks + task_profiles ServiceCapacityLow diff --git a/graphics/composer/2.2/default/android.hardware.graphics.composer@2.2-service.rc b/graphics/composer/2.2/default/android.hardware.graphics.composer@2.2-service.rc index efe6dadbc2..7714119993 100644 --- a/graphics/composer/2.2/default/android.hardware.graphics.composer@2.2-service.rc +++ b/graphics/composer/2.2/default/android.hardware.graphics.composer@2.2-service.rc @@ -4,4 +4,4 @@ service vendor.hwcomposer-2-2 /vendor/bin/hw/android.hardware.graphics.composer@ group graphics drmrpc capabilities SYS_NICE onrestart restart surfaceflinger - writepid /dev/cpuset/system-background/tasks + task_profiles ServiceCapacityLow diff --git a/graphics/composer/2.3/default/android.hardware.graphics.composer@2.3-service.rc b/graphics/composer/2.3/default/android.hardware.graphics.composer@2.3-service.rc index 81ce89059c..d3835a4121 100644 --- a/graphics/composer/2.3/default/android.hardware.graphics.composer@2.3-service.rc +++ b/graphics/composer/2.3/default/android.hardware.graphics.composer@2.3-service.rc @@ -4,4 +4,4 @@ service vendor.hwcomposer-2-3 /vendor/bin/hw/android.hardware.graphics.composer@ group graphics drmrpc capabilities SYS_NICE onrestart restart surfaceflinger - writepid /dev/cpuset/system-background/tasks + task_profiles ServiceCapacityLow diff --git a/graphics/composer/2.4/default/android.hardware.graphics.composer@2.4-service.rc b/graphics/composer/2.4/default/android.hardware.graphics.composer@2.4-service.rc index a296b0aace..d82dcd92f0 100644 --- a/graphics/composer/2.4/default/android.hardware.graphics.composer@2.4-service.rc +++ b/graphics/composer/2.4/default/android.hardware.graphics.composer@2.4-service.rc @@ -4,4 +4,4 @@ service vendor.hwcomposer-2-4 /vendor/bin/hw/android.hardware.graphics.composer@ group graphics drmrpc capabilities SYS_NICE onrestart restart surfaceflinger - writepid /dev/cpuset/system-background/tasks + task_profiles ServiceCapacityLow diff --git a/sensors/2.0/multihal/android.hardware.sensors@2.0-service-multihal.rc b/sensors/2.0/multihal/android.hardware.sensors@2.0-service-multihal.rc index 0b3d4c2dce..8867a1ae8e 100644 --- a/sensors/2.0/multihal/android.hardware.sensors@2.0-service-multihal.rc +++ b/sensors/2.0/multihal/android.hardware.sensors@2.0-service-multihal.rc @@ -2,6 +2,6 @@ service vendor.sensors-hal-2-0-multihal /vendor/bin/hw/android.hardware.sensors@ class hal user system group system wakelock context_hub - writepid /dev/cpuset/system-background/tasks + task_profiles ServiceCapacityLow capabilities BLOCK_SUSPEND rlimit rtprio 10 10 diff --git a/sensors/2.1/multihal/android.hardware.sensors@2.1-service-multihal.rc b/sensors/2.1/multihal/android.hardware.sensors@2.1-service-multihal.rc index fc99ee7a06..f47e060f88 100644 --- a/sensors/2.1/multihal/android.hardware.sensors@2.1-service-multihal.rc +++ b/sensors/2.1/multihal/android.hardware.sensors@2.1-service-multihal.rc @@ -2,6 +2,6 @@ service vendor.sensors-hal-2-1-multihal /vendor/bin/hw/android.hardware.sensors@ class hal user system group system wakelock context_hub - writepid /dev/cpuset/system-background/tasks + task_profiles ServiceCapacityLow capabilities BLOCK_SUSPEND rlimit rtprio 10 10 diff --git a/tv/tuner/1.0/default/android.hardware.tv.tuner@1.0-service-lazy.rc b/tv/tuner/1.0/default/android.hardware.tv.tuner@1.0-service-lazy.rc index ad72fae706..ed62ceeb8e 100644 --- a/tv/tuner/1.0/default/android.hardware.tv.tuner@1.0-service-lazy.rc +++ b/tv/tuner/1.0/default/android.hardware.tv.tuner@1.0-service-lazy.rc @@ -6,4 +6,4 @@ service vendor.tuner-hal-1-0 /vendor/bin/hw/android.hardware.tv.tuner@1.0-servic user media group mediadrm drmrpc ioprio rt 4 - writepid /dev/cpuset/foreground/tasks \ No newline at end of file + task_profiles ProcessCapacityHigh diff --git a/tv/tuner/1.0/default/android.hardware.tv.tuner@1.0-service.rc b/tv/tuner/1.0/default/android.hardware.tv.tuner@1.0-service.rc index 6d59ed75bb..5d5b943c47 100644 --- a/tv/tuner/1.0/default/android.hardware.tv.tuner@1.0-service.rc +++ b/tv/tuner/1.0/default/android.hardware.tv.tuner@1.0-service.rc @@ -3,4 +3,4 @@ service vendor.tuner-hal-1-0 /vendor/bin/hw/android.hardware.tv.tuner@1.0-servic user media group mediadrm drmrpc ioprio rt 4 - writepid /dev/cpuset/foreground/tasks \ No newline at end of file + task_profiles ProcessCapacityHigh