diff --git a/configs/task_profiles/cgroups_26.json b/configs/task_profiles/cgroups_26.json new file mode 100644 index 00000000..17d49294 --- /dev/null +++ b/configs/task_profiles/cgroups_26.json @@ -0,0 +1,11 @@ +{ + "Cgroups": [ + { + "Controller": "schedtune", + "Path": "/dev/stune", + "Mode": "0755", + "UID": "system", + "GID": "system" + } + ] +} diff --git a/configs/task_profiles/task_profiles_26.json b/configs/task_profiles/task_profiles_26.json new file mode 100644 index 00000000..9f837859 --- /dev/null +++ b/configs/task_profiles/task_profiles_26.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" + } + } + ] + } + ] +} diff --git a/sdm660.mk b/sdm660.mk index 02f8a51e..6c39648c 100644 --- a/sdm660.mk +++ b/sdm660.mk @@ -531,6 +531,13 @@ PRODUCT_PROPERTY_OVERRIDES += \ PRODUCT_PROPERTY_OVERRIDES += \ persist.sys.binary_xml=false +# Task profiles +PRODUCT_COPY_FILES += \ + $(COMMON_PATH)/configs/task_profiles/cgroups_26.json:$(TARGET_COPY_OUT_SYSTEM)/etc/task_profiles/cgroups_26.json \ + $(COMMON_PATH)/configs/task_profiles/task_profiles_26.json:$(TARGET_COPY_OUT_SYSTEM)/etc/task_profiles/task_profiles_26.json \ + $(COMMON_PATH)/configs/task_profiles/cgroups_26.json:$(TARGET_COPY_OUT_VENDOR)/etc/cgroups.json \ + $(COMMON_PATH)/configs/task_profiles/task_profiles_26.json:$(TARGET_COPY_OUT_VENDOR)/etc/task_profiles.json + # Tetheroffload PRODUCT_PACKAGES += \ ipacm \