summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRick Yiu <rickyiu@google.com>2020-10-26 14:34:53 +0800
committerRick Yiu <rickyiu@google.com>2020-11-04 08:46:35 +0000
commitbdb045c3bb0ff1abc8ebd1773a244f176dda0c2b (patch)
tree59c1da3dc49459cdcdb23fe1aca015cebd15a9a5
parent2dcbd3c8c44ec433ef42179328bf67c8083e836d (diff)
downloadbonito-bdb045c3bb0ff1abc8ebd1773a244f176dda0c2b.tar.gz
bonito: Add vendor libprocessgroup json file
While schedtune is removed from AOSP libprocessgroup json files, we need to add it back through vendor json files. Bug: 170507876 Test: schedtune works Change-Id: I9da386c48b46d562f9a82a01d1b98ae69c078a94 Merged-In: I9da386c48b46d562f9a82a01d1b98ae69c078a94
-rw-r--r--cgroups.json11
-rw-r--r--device.mk4
-rw-r--r--task_profiles.json121
3 files changed, 136 insertions, 0 deletions
diff --git a/cgroups.json b/cgroups.json
new file mode 100644
index 00000000..17d49294
--- /dev/null
+++ b/cgroups.json
@@ -0,0 +1,11 @@
+{
+ "Cgroups": [
+ {
+ "Controller": "schedtune",
+ "Path": "/dev/stune",
+ "Mode": "0755",
+ "UID": "system",
+ "GID": "system"
+ }
+ ]
+}
diff --git a/device.mk b/device.mk
index da6807ad..41dfdaf7 100644
--- a/device.mk
+++ b/device.mk
@@ -240,6 +240,10 @@ PRODUCT_PACKAGES += \
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/powerhint.json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.json
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/task_profiles.json:$(TARGET_COPY_OUT_VENDOR)/etc/task_profiles.json \
+ $(LOCAL_PATH)/cgroups.json:$(TARGET_COPY_OUT_VENDOR)/etc/cgroups.json
+
# perfstatsd
PRODUCT_PACKAGES_DEBUG += \
perfstatsd
diff --git a/task_profiles.json b/task_profiles.json
new file mode 100644
index 00000000..a9e45b5d
--- /dev/null
+++ b/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"
+ }
+ }
+ ]
+ }
+ ]
+}