From 98d3a3b0daa4939e819ba99d798284857008aaac Mon Sep 17 00:00:00 2001 From: Fazil Sheik Date: Sat, 14 Sep 2024 18:53:18 +0530 Subject: [PATCH] sensors: Replace direct pid writes with setting task profiles for als service For easy transition from SchedTune to UtilClamp, direct access to these cgroups should be abstracted by using task profiles. Replace writepid commands with new task_profiles command. Bug: 155419956 Test: change .rc file and confirm task profile is applied --- sensors/als_correction_service.rc | 2 +- sensors/android.hardware.sensors@2.1-service-multihal.rc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sensors/als_correction_service.rc b/sensors/als_correction_service.rc index dc26fd31..7498b594 100644 --- a/sensors/als_correction_service.rc +++ b/sensors/als_correction_service.rc @@ -2,4 +2,4 @@ service als_correction_service /system_ext/bin/als_correction_service class hal user system group system - writepid /dev/cpuset/system-background/tasks + task_profiles ServiceCapacityLow diff --git a/sensors/android.hardware.sensors@2.1-service-multihal.rc b/sensors/android.hardware.sensors@2.1-service-multihal.rc index 3856c8e8..deea16e4 100644 --- a/sensors/android.hardware.sensors@2.1-service-multihal.rc +++ b/sensors/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 input - writepid /dev/cpuset/system-background/tasks + task_profiles ServiceCapacityLow capabilities BLOCK_SUSPEND rlimit rtprio 10 10