summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRick Yiu <rickyiu@google.com>2020-11-05 06:52:38 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-11-05 06:52:38 +0000
commit6d9cb71931877c832e2b479f340b374ca449d750 (patch)
tree937f8eaa7d8679e293c3b09284e6f1a5e0ceaba5
parent6517c2213038e505883ba192e4f6978418144d4d (diff)
parentef7bc07f7b092f18ec75c0464cb602b80ab4e545 (diff)
downloadbonito-6d9cb71931877c832e2b479f340b374ca449d750.tar.gz
Merge "bonito: Add vendor libprocessgroup json file" am: ef7bc07f7b
Original change: https://android-review.googlesource.com/c/device/google/bonito/+/1486162 Change-Id: I3fec9ff7307d7d31c59a7099b8061a9add21f5ab
-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 1b2275a7..1c8eb9ae 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"
+ }
+ }
+ ]
+ }
+ ]
+}