From 4395b79e9fdf8e45405b0185ccc81856e6fa4cfb Mon Sep 17 00:00:00 2001 From: Suren Baghdasaryan Date: Thu, 17 Jun 2021 18:42:44 -0700 Subject: [PATCH] sm6150-common: 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: Ibb56d2379c42e5ed4b2f15c1b04d5fb163b48678 --- ....lineage.livedisplay@2.1-service.xiaomi_sm6150.rc | 2 +- rootdir/etc/init.qcom.rc | 10 +++++----- rootdir/etc/init.target.rc | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/livedisplay/vendor.lineage.livedisplay@2.1-service.xiaomi_sm6150.rc b/livedisplay/vendor.lineage.livedisplay@2.1-service.xiaomi_sm6150.rc index aa9eb27..8b66cee 100644 --- a/livedisplay/vendor.lineage.livedisplay@2.1-service.xiaomi_sm6150.rc +++ b/livedisplay/vendor.lineage.livedisplay@2.1-service.xiaomi_sm6150.rc @@ -9,4 +9,4 @@ service vendor.livedisplay-hal-2-1 /vendor/bin/hw/vendor.lineage.livedisplay@2.1 class late_start user system group system - writepid /dev/cpuset/system-background/tasks + task_profiles ServiceCapacityLow diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc index 502019d..238aae0 100644 --- a/rootdir/etc/init.qcom.rc +++ b/rootdir/etc/init.qcom.rc @@ -237,20 +237,20 @@ service vendor.qrtr-ns /vendor/bin/qrtr-ns -f user vendor_qrtr group vendor_qrtr capabilities NET_BIND_SERVICE - writepid /dev/cpuset/system-background/tasks + task_profiles ServiceCapacityLow service irsc_util /vendor/bin/irsc_util "/vendor/etc/sec_config" class core user root oneshot - writepid /dev/cpuset/system-background/tasks + task_profiles ServiceCapacityLow service vendor.cnss-daemon /vendor/bin/cnss-daemon -n -l class late_start user system group system inet net_admin wifi capabilities NET_ADMIN - writepid /dev/cpuset/system-background/tasks + task_profiles ServiceCapacityLow on property:sys.shutdown.requested=* write /sys/kernel/shutdown_wlan/shutdown 1 @@ -260,7 +260,7 @@ service vendor.loc_launcher /vendor/bin/loc_launcher class late_start user gps group gps - writepid /dev/cpuset/system-background/tasks + task_profiles ServiceCapacityLow on property:persist.sys.xtra-daemon.enabled=* restart vendor.loc_launcher @@ -285,7 +285,7 @@ service vendor.msm_irqbalance /vendor/bin/msm_irqbalance -f /vendor/etc/msm_irqb class core user root group root - writepid /dev/cpuset/system-background/tasks + task_profiles ServiceCapacityLow service vendor.power_off_alarm /vendor/bin/power_off_alarm class core diff --git a/rootdir/etc/init.target.rc b/rootdir/etc/init.target.rc index 6caacff..816e5bd 100644 --- a/rootdir/etc/init.target.rc +++ b/rootdir/etc/init.target.rc @@ -139,20 +139,20 @@ service vendor.pd_mapper /vendor/bin/pd-mapper class core user system group system - writepid /dev/cpuset/system-background/tasks + task_profiles ServiceCapacityLow service vendor.per_mgr /vendor/bin/pm-service class core user system group system ioprio rt 4 - writepid /dev/cpuset/system-background/tasks + task_profiles ServiceCapacityLow service vendor.per_proxy /vendor/bin/pm-proxy class core user system group system - writepid /dev/cpuset/system-background/tasks + task_profiles ServiceCapacityLow disabled on property:init.svc.vendor.per_mgr=running @@ -181,19 +181,19 @@ service vendor.thermal-engine /vendor/bin/thermal-engine socket thermal-recv-passive-client stream 0666 system system socket thermal-send-rule stream 0660 system system group root - writepid /dev/cpuset/system-background/tasks + task_profiles ServiceCapacityLow service vendor.hvdcp_opti /vendor/bin/hvdcp_opti class main user root group system wakelock - writepid /dev/cpuset/system-background/tasks + task_profiles ServiceCapacityLow service vendor.remosaic_daemon /vendor/bin/remosaic_daemon class late_start user camera group camera - writepid /dev/cpuset/system-background/tasks + task_profiles ServiceCapacityLow service vendor.nv_mac /vendor/bin/nv_mac class main