From 87bf601c9cd6c55b45a1c00f0b61aab37e1de077 Mon Sep 17 00:00:00 2001 From: Ocean Chen Date: Wed, 4 Sep 2024 16:00:25 +0800 Subject: [PATCH] Switch from the BFQ to the mq-deadline I/O scheduler The mq-deadline I/O scheduler is more stable than BFQ. Additionally, the boot time is shorter with the mq-deadline I/O scheduler. It only changes the scheduler on new kernel. Bug: 186902601 Test: forrest build Change-Id: I51605b32afb4340d416fe4923570bb3f4af24ab8 Signed-off-by: Ocean Chen --- conf/init.zuma.rc | 5 +---- device.mk | 8 ++++++++ storage/5.15/init.zuma.storage.rc | 3 +++ storage/6.1/init.zuma.storage.rc | 2 ++ 4 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 storage/5.15/init.zuma.storage.rc create mode 100644 storage/6.1/init.zuma.storage.rc diff --git a/conf/init.zuma.rc b/conf/init.zuma.rc index f0cbf01c..dfa42b3e 100644 --- a/conf/init.zuma.rc +++ b/conf/init.zuma.rc @@ -1,3 +1,4 @@ +import /vendor/etc/init/hw/init.zuma.storage.rc import /vendor/etc/init/hw/init.zuma.usb.rc import android.hardware.drm@1.2-service.widevine.rc import init.exynos.sensorhub.rc @@ -15,10 +16,6 @@ on init # Disable util-awareness for mids and bigs write /proc/vendor_sched/teo_util_threshold "2 1024 1024" - # Boot time fs tuning - write /sys/block/sda/queue/scheduler bfq - write /sys/block/sda/queue/iosched/slice_idle 0 - chown system system /proc/vendor_sched/groups/bg/set_task_group chown system system /proc/vendor_sched/groups/cam/set_task_group chown system system /proc/vendor_sched/groups/fg/set_task_group diff --git a/device.mk b/device.mk index 542fdc9e..e31c0d39 100644 --- a/device.mk +++ b/device.mk @@ -380,6 +380,14 @@ PRODUCT_COPY_FILES += \ device/google/zuma/conf/init.freq.userdebug.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.freq.userdebug.rc endif +ifneq (,$(filter 5.%, $(TARGET_LINUX_KERNEL_VERSION))) +PRODUCT_COPY_FILES += \ + device/google/zuma/storage/5.15/init.zuma.storage.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.zuma.storage.rc +else +PRODUCT_COPY_FILES += \ + device/google/zuma/storage/6.1/init.zuma.storage.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.zuma.storage.rc +endif + # Recovery files PRODUCT_COPY_FILES += \ device/google/zuma/conf/init.recovery.device.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.zuma.rc diff --git a/storage/5.15/init.zuma.storage.rc b/storage/5.15/init.zuma.storage.rc new file mode 100644 index 00000000..7df260de --- /dev/null +++ b/storage/5.15/init.zuma.storage.rc @@ -0,0 +1,3 @@ +on init + write /sys/block/sda/queue/scheduler bfq + write /sys/block/sda/queue/iosched/slice_idle 0 \ No newline at end of file diff --git a/storage/6.1/init.zuma.storage.rc b/storage/6.1/init.zuma.storage.rc new file mode 100644 index 00000000..3d88bb69 --- /dev/null +++ b/storage/6.1/init.zuma.storage.rc @@ -0,0 +1,2 @@ +on init + write /sys/block/sda/queue/scheduler mq-deadline \ No newline at end of file