diff options
author | Bart Van Assche <bvanassche@google.com> | 2022-01-26 00:24:39 +0000 |
---|---|---|
committer | Bart Van Assche <bvanassche@google.com> | 2022-03-10 18:52:07 +0000 |
commit | f5542dd8373e688785298eca1c82ad12a38b50bb (patch) | |
tree | af13f1bf6a505d5334abe085f9dac710b8c16b5b | |
parent | 0d7ebc836bfd07800f09f505389b59bb1f43fcac (diff) | |
download | bonito-f5542dd8373e688785298eca1c82ad12a38b50bb.tar.gz |
Migrate the blkio controller to the cgroup v2 hierarchy
Remove the statements from init.hardware.rc that refer to /dev/blkio
since that path is only valid for the v1 cgroup hierarchy. Move the
device settings into task_profiles.json.
Bug: 213617178
Test: Untested.
Change-Id: Ibb62b2d4d8026ab127edd402b4cfb8070327a568
Signed-off-by: Bart Van Assche <bvanassche@google.com>
-rw-r--r-- | device.mk | 1 | ||||
-rw-r--r-- | init.hardware.rc | 7 | ||||
-rw-r--r-- | task_profiles.json | 132 |
3 files changed, 133 insertions, 7 deletions
@@ -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" + } + } + ] + } + ] +} |