g12: Copy cgroups configs from system/core where possible
authorNolen Johnson <johnsonnolen@gmail.com>
Fri, 3 May 2024 20:02:32 +0000 (16:02 -0400)
committerNolen Johnson <johnsonnolen@gmail.com>
Fri, 3 May 2024 20:02:32 +0000 (16:02 -0400)
* cgroups.json is identical, task_profiles has differences.

Change-Id: I477d5f4f5015f18acedf644f56dc6cad4c1c2d00

configs/task_profiles.json [new file with mode: 0644]
g12.mk
proprietary-files.txt

diff --git a/configs/task_profiles.json b/configs/task_profiles.json
new file mode 100644 (file)
index 0000000..a9e45b5
--- /dev/null
@@ -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 aacbcb1951eaedae1c8063004fb829830890150d..f0768428abd26dc873db2b69dc4d689528694c27 100644 (file)
--- 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 \
index a88dc2f9c94c1b2b3890bb51fee469bdab26a344..f8a6b14de3e02781a3586fa2fa6270d82d695761 100644 (file)
@@ -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