flo: Use sys.io.scheduler for 12

Take logic from lineage-iosched.rc

As "prebuilt/common/etc/init/lineage-iosched.rc" has been removed
be135083d6
This commit is contained in:
followmsi 2021-12-02 13:33:03 +01:00
parent 1b1346af80
commit ce421e972f
1 changed files with 16 additions and 0 deletions

View File

@ -146,6 +146,22 @@ on boot
# Wifi firmware reload path
chown wifi wifi /sys/module/wlan/parameters/fwpath
restorecon --recursive /sys/block/mmcblk0/queue
chown system system /sys/block/mmcblk0/queue/scheduler
chmod 0664 /sys/block/mmcblk0/queue/scheduler
# Configure IO scheduler
on property:sys.io.scheduler=*
write /sys/block/mmcblk0/queue/scheduler ${sys.io.scheduler}
on property:persist.sys.io.scheduler=*
setprop sys.io.scheduler ${persist.sys.io.scheduler}
# Set slice_idle to 0 for CFQ
on property:sys.io.scheduler=cfq
restorecon --recursive /sys/block/mmcblk0/queue
write /sys/block/mmcblk0/queue/iosched/slice_idle 0
on property:sys.boot_completed=1
setprop sys.io.scheduler cfq
write /sys/block/mmcblk0/bdi/read_ahead_kb 256