From 0cc060fa35904ed7be4d9174d304dc812a75c84f Mon Sep 17 00:00:00 2001 From: Eamon Powell Date: Tue, 16 Nov 2021 18:57:21 -0800 Subject: [PATCH] sm7250-common: Add task profiles for API 31 This is necessary in order for stune boost to work. Change-Id: Icc3444be95a177fb4b6ef77cbf582d696381b9cb Signed-off-by: aswin7469 Signed-off-by: Manikantaraavi --- common.mk | 5 ++ task_profiles/cgroups_31.json | 11 +++ task_profiles/task_profiles_31.json | 135 ++++++++++++++++++++++++++++ 3 files changed, 151 insertions(+) create mode 100644 task_profiles/cgroups_31.json create mode 100644 task_profiles/task_profiles_31.json diff --git a/common.mk b/common.mk index 88507ee..4c39d84 100644 --- a/common.mk +++ b/common.mk @@ -88,6 +88,11 @@ PRODUCT_COPY_FILES += \ frameworks/native/data/etc/com.nxp.mifare.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/com.nxp.mifare.xml \ frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml +# Task profiles +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/task_profiles/cgroups_31.json:$(TARGET_COPY_OUT_SYSTEM)/etc/task_profiles/cgroups_31.json \ + $(LOCAL_PATH)/task_profiles/task_profiles_31.json:$(TARGET_COPY_OUT_SYSTEM)/etc/task_profiles/task_profiles_31.json + # A/B AB_OTA_POSTINSTALL_CONFIG += \ RUN_POSTINSTALL_system=true \ diff --git a/task_profiles/cgroups_31.json b/task_profiles/cgroups_31.json new file mode 100644 index 0000000..17d4929 --- /dev/null +++ b/task_profiles/cgroups_31.json @@ -0,0 +1,11 @@ +{ + "Cgroups": [ + { + "Controller": "schedtune", + "Path": "/dev/stune", + "Mode": "0755", + "UID": "system", + "GID": "system" + } + ] +} diff --git a/task_profiles/task_profiles_31.json b/task_profiles/task_profiles_31.json new file mode 100644 index 0000000..9f83785 --- /dev/null +++ b/task_profiles/task_profiles_31.json @@ -0,0 +1,135 @@ +{ + "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": "NNApiHALPerformance", + "Actions": [ + { + "Name": "JoinCgroup", + "Params": + { + "Controller": "schedtune", + "Path": "nnapi-hal" + } + } + ] + }, + + { + "Name": "CpuPolicySpread", + "Actions": [ + { + "Name": "SetAttribute", + "Params": + { + "Name": "STunePreferIdle", + "Value": "1" + } + } + ] + }, + { + "Name": "CpuPolicyPack", + "Actions": [ + { + "Name": "SetAttribute", + "Params": + { + "Name": "STunePreferIdle", + "Value": "0" + } + } + ] + } + ] +}