summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@google.com>2022-03-29 18:53:23 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-03-29 18:53:23 +0000
commitef5ecc3324ff66318cbc62d7e7bd32faf39332cd (patch)
treeaf13f1bf6a505d5334abe085f9dac710b8c16b5b
parent24519c65273d4d400198287e91328e6002fd06aa (diff)
parentf5542dd8373e688785298eca1c82ad12a38b50bb (diff)
downloadbonito-ef5ecc3324ff66318cbc62d7e7bd32faf39332cd.tar.gz
Migrate the blkio controller to the cgroup v2 hierarchy am: f5542dd837
Original change: https://android-review.googlesource.com/c/device/google/bonito/+/1961880 Change-Id: I8f654c00e70c62759916e80f745f64419b8bd12d Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--device.mk1
-rw-r--r--init.hardware.rc7
-rw-r--r--task_profiles.json132
3 files changed, 133 insertions, 7 deletions
diff --git a/device.mk b/device.mk
index 3cba50d0..f6380e61 100644
--- a/device.mk
+++ b/device.mk
@@ -47,6 +47,7 @@ PRODUCT_PRODUCT_PROPERTIES += \
PRODUCT_COPY_FILES += \
device/google/bonito/default-permissions.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default-permissions/default-permissions.xml \
device/google/bonito/component-overrides.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sysconfig/component-overrides.xml \
+ device/google/bonito/task_profiles.json:$(TARGET_COPY_OUT_VENDOR)/etc/task_profiles.json \
frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml \
frameworks/native/data/etc/android.software.verified_boot.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.verified_boot.xml
diff --git a/init.hardware.rc b/init.hardware.rc
index ad788c9c..4c3a8416 100644
--- a/init.hardware.rc
+++ b/init.hardware.rc
@@ -508,13 +508,6 @@ on property:sys.boot_completed=1
write /dev/cpuset/system-background/cpus 2-5
write /dev/cpuset/restricted/cpus 2-5
- # Setup final blkio
- # value for group_idle is us
- write /dev/blkio/blkio.weight 1000
- write /dev/blkio/background/blkio.weight 200
- write /dev/blkio/blkio.group_idle 2000
- write /dev/blkio/background/blkio.group_idle 0
-
# QCOM FG SRAM dump for dumpstate
chown system system /d/fg/sram/data
chown system system /d/fg/sram/count
diff --git a/task_profiles.json b/task_profiles.json
new file mode 100644
index 00000000..55657e05
--- /dev/null
+++ b/task_profiles.json
@@ -0,0 +1,132 @@
+{
+ "Profiles": [
+ {
+ "Name": "LowIoPriority",
+ "Actions": [
+ {
+ "Name": "SetAttribute",
+ "Params":
+ {
+ "Name": "BfqWeight",
+ "Value": "10",
+ "IgnoreFailure": "true"
+ }
+ },
+ {
+ "Name": "SetAttribute",
+ "Params":
+ {
+ "Name": "CfqGroupIdle",
+ "Value": "0",
+ "IgnoreFailure": "true"
+ }
+ },
+ {
+ "Name": "SetAttribute",
+ "Params":
+ {
+ "Name": "CfqWeight",
+ "Value": "200",
+ "IgnoreFailure": "true"
+ }
+ }
+ ]
+ },
+ {
+ "Name": "NormalIoPriority",
+ "Actions": [
+ {
+ "Name": "SetAttribute",
+ "Params":
+ {
+ "Name": "BfqWeight",
+ "Value": "100",
+ "IgnoreFailure": "true"
+ }
+ },
+ {
+ "Name": "SetAttribute",
+ "Params":
+ {
+ "Name": "CfqGroupIdle",
+ "Value": "2000",
+ "IgnoreFailure": "true"
+ }
+ },
+ {
+ "Name": "SetAttribute",
+ "Params":
+ {
+ "Name": "CfqWeight",
+ "Value": "1000",
+ "IgnoreFailure": "true"
+ }
+ }
+ ]
+ },
+ {
+ "Name": "HighIoPriority",
+ "Actions": [
+ {
+ "Name": "SetAttribute",
+ "Params":
+ {
+ "Name": "BfqWeight",
+ "Value": "100",
+ "IgnoreFailure": "true"
+ }
+ },
+ {
+ "Name": "SetAttribute",
+ "Params":
+ {
+ "Name": "CfqGroupIdle",
+ "Value": "2000",
+ "IgnoreFailure": "true"
+ }
+ },
+ {
+ "Name": "SetAttribute",
+ "Params":
+ {
+ "Name": "CfqWeight",
+ "Value": "1000",
+ "IgnoreFailure": "true"
+ }
+ }
+ ]
+ },
+ {
+ "Name": "MaxIoPriority",
+ "Actions": [
+ {
+ "Name": "SetAttribute",
+ "Params":
+ {
+ "Name": "BfqWeight",
+ "Value": "100",
+ "IgnoreFailure": "true"
+ }
+ },
+ {
+ "Name": "SetAttribute",
+ "Params":
+ {
+ "Name": "CfqGroupIdle",
+ "Value": "2000",
+ "IgnoreFailure": "true"
+ }
+ },
+ {
+ "Name": "SetAttribute",
+ "Params":
+ {
+ "Name": "CfqWeight",
+ "Value": "1000",
+ "IgnoreFailure": "true"
+ }
+ }
+ ]
+ }
+ ]
+}