From c815f700e07357a6b8c3977f93fcd676ace8110d Mon Sep 17 00:00:00 2001 From: Steve Kondik Date: Wed, 16 Sep 2015 15:08:48 -0700 Subject: [PATCH] cm: Set IOPS mode for CFQ and BFQ automatically * Always set slice_idle to 0 for CFQ and BFQ (IOPS mode). This is a guaranteed performance boost for nonrotational storage and is also the new default in Linux 4.2+ Change-Id: Id271a4283219beb272c174de0e452c6c42c4e572 --- prebuilt/common/etc/init.local.rc | 35 +++++++++++++++++++------------ 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/prebuilt/common/etc/init.local.rc b/prebuilt/common/etc/init.local.rc index 7abf3d7f..a38f62c0 100644 --- a/prebuilt/common/etc/init.local.rc +++ b/prebuilt/common/etc/init.local.rc @@ -25,7 +25,7 @@ on init # Realtime display class mkdir /sys/fs/cgroup/bfqio/rt-display 0755 root system - write /sys/fs/cgroup/bfqio/rt-display/bfqio.ioprio_class 1 + write /sys/fs/cgroup/bfqio/rt-display/bfqio.ioprio_class 1 write /sys/fs/cgroup/bfqio/rt-display/bfqio.ioprio 7 write /sys/fs/cgroup/bfqio/rt-display/bfqio.weight 1000 chown system graphics /sys/fs/cgroup/bfqio/rt-display/tasks @@ -42,7 +42,7 @@ on init # Hipri class mkdir /sys/fs/cgroup/bfqio/hipri 0755 root system write /sys/fs/cgroup/bfqio/hipri/bfqio.ioprio_class 2 - write /sys/fs/cgroup/bfqio/hipri/bfqio.ioprio 2 + write /sys/fs/cgroup/bfqio/hipri/bfqio.ioprio 2 write /sys/fs/cgroup/bfqio/hipri/bfqio.weight 1000 chown root system /sys/fs/cgroup/bfqio/hipri/tasks chmod 0666 /sys/fs/cgroup/bfqio/hipri/tasks @@ -165,10 +165,24 @@ on boot # Persistent properties (only created if persist exists) mkdir /persist/properties 0770 system system +# sysinit (/system/etc/init.d) +service sysinit /system/bin/sysinit + user root + oneshot + disabled + +# bugreport is triggered by holding down volume down, volume up and power +service bugreport /system/bin/dumpstate -d -p -B \ + -o /data/data/com.android.shell/files/bugreports/bugreport + oneshot + disabled + keycodes 114 115 116 + # adb over network on property:service.adb.tcp.port=5555 stop adbd start adbd + on property:service.adb.tcp.port=-1 stop adbd start adbd @@ -189,15 +203,10 @@ on property:sys.io.scheduler=* on property:persist.sys.io.scheduler=* setprop sys.io.scheduler ${persist.sys.io.scheduler} -# sysinit (/system/etc/init.d) -service sysinit /system/bin/sysinit - user root - oneshot - disabled +# Set slice_idle to 0 for CFQ +on property:sys.io.scheduler=cfq + write /sys/block/mmcblk0/queue/iosched/slice_idle 0 -# bugreport is triggered by holding down volume down, volume up and power -service bugreport /system/bin/dumpstate -d -p -B \ - -o /data/data/com.android.shell/files/bugreports/bugreport - oneshot - disabled - keycodes 114 115 116 +# Set slice_idle to 0 for BFQ +on property:sys.io.scheduler=bfq + write /sys/block/mmcblk0/queue/iosched/slice_idle 0 \ No newline at end of file