From: Nolen Johnson Date: Fri, 3 May 2024 20:02:32 +0000 (-0400) Subject: g12: Copy cgroups configs from system/core where possible X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=258f1137c62e08571917dba30c8c5f32095405d3;p=GitHub%2FLineageOS%2FG12%2Fandroid_device_amlogic_g12-common.git g12: Copy cgroups configs from system/core where possible * cgroups.json is identical, task_profiles has differences. Change-Id: I477d5f4f5015f18acedf644f56dc6cad4c1c2d00 --- 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