From 258f1137c62e08571917dba30c8c5f32095405d3 Mon Sep 17 00:00:00 2001 From: Nolen Johnson Date: Fri, 3 May 2024 16:02:32 -0400 Subject: [PATCH] g12: Copy cgroups configs from system/core where possible * cgroups.json is identical, task_profiles has differences. Change-Id: I477d5f4f5015f18acedf644f56dc6cad4c1c2d00 --- configs/task_profiles.json | 121 +++++++++++++++++++++++++++++++++++++ g12.mk | 5 ++ proprietary-files.txt | 4 -- 3 files changed, 126 insertions(+), 4 deletions(-) create mode 100644 configs/task_profiles.json diff --git a/configs/task_profiles.json b/configs/task_profiles.json new file mode 100644 index 0000000..a9e45b5 --- /dev/null +++ b/configs/task_profiles.json @@ -0,0 +1,121 @@ +{ + "Attributes": [ + { + "Name": "STuneBoost", + "Controller": "schedtune", + "File": "schedtune.boost" + }, + { + "Name": "STunePreferIdle", + "Controller": "schedtune", + "File": "schedtune.prefer_idle" + } + ], + + "Profiles": [ + { + "Name": "HighEnergySaving", + "Actions": [ + { + "Name": "JoinCgroup", + "Params": + { + "Controller": "schedtune", + "Path": "background" + } + } + ] + }, + { + "Name": "NormalPerformance", + "Actions": [ + { + "Name": "JoinCgroup", + "Params": + { + "Controller": "schedtune", + "Path": "" + } + } + ] + }, + { + "Name": "HighPerformance", + "Actions": [ + { + "Name": "JoinCgroup", + "Params": + { + "Controller": "schedtune", + "Path": "foreground" + } + } + ] + }, + { + "Name": "MaxPerformance", + "Actions": [ + { + "Name": "JoinCgroup", + "Params": + { + "Controller": "schedtune", + "Path": "top-app" + } + } + ] + }, + { + "Name": "RealtimePerformance", + "Actions": [ + { + "Name": "JoinCgroup", + "Params": + { + "Controller": "schedtune", + "Path": "rt" + } + } + ] + }, + { + "Name": "CameraServicePerformance", + "Actions": [ + { + "Name": "JoinCgroup", + "Params": + { + "Controller": "schedtune", + "Path": "camera-daemon" + } + } + ] + }, + { + "Name": "CpuPolicySpread", + "Actions": [ + { + "Name": "SetAttribute", + "Params": + { + "Name": "STunePreferIdle", + "Value": "1" + } + } + ] + }, + { + "Name": "CpuPolicyPack", + "Actions": [ + { + "Name": "SetAttribute", + "Params": + { + "Name": "STunePreferIdle", + "Value": "0" + } + } + ] + } + ] +} diff --git a/g12.mk b/g12.mk index aacbcb1..f076842 100644 --- a/g12.mk +++ b/g12.mk @@ -43,6 +43,11 @@ PRODUCT_PACKAGES += \ camera.device@3.4-impl \ camera.device@3.5-impl +## Cgroups +PRODUCT_COPY_FILES += \ + system/core/libprocessgroup/profiles/cgroups_28.json:$(TARGET_COPY_OUT_VENDOR)/etc/cgroups.json \ + $(LOCAL_PATH)/configs/task_profiles.json:$(TARGET_COPY_OUT_VENDOR)/etc/task_profiles.json + ## Codecs PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/media/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles.xml \ diff --git a/proprietary-files.txt b/proprietary-files.txt index a88dc2f..f8a6b14 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -46,10 +46,6 @@ vendor/lib/hw/android.hardware.bluetooth@1.0-impl-droidlogic.so vendor/lib/hw/camera.amlogic.so vendor/lib/libispaaa.so -# Cgroups -vendor/etc/cgroups.json -vendor/etc/task_profiles.json - # Common vendor/bin/ddrtest.sh vendor/etc/lowmemorykiller.txt -- 2.20.1