[PATCH] RFC: kernel: Remove CFQ activate BFQ

Linus Walleij linus.walleij at linaro.org
Wed Apr 14 12:42:30 BST 2021


The CFQ IO scheduler is deleted from the Linux kernel
since commit f382fb0bcef4c37dc049e9f6963e3baf204d815c
"block: remove legacy IO schedulers".

The new multiqueue block layer has an IO scheduler named
BFQ (Budget Fair Queue) that is suitable for slow
single-queue block devices such as (S)ATA harddrives,
flash memories, MMC/SD cards and USB dongles, so activate
that instead.

To actually use BFQ by default distributions such as
Fedora uses this (/lib/udev/rules.d/60-block-scheduler.rules):

ACTION=="add", SUBSYSTEM=="block", \
  KERNEL=="mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|sd*[!0-9]|sr*", \
  ATTR{queue/scheduler}="bfq"

We are not using udev so we need a similar rule in a
similar patch for procd, or we can patch the kernel to
use BFQ by default if we do not expect people to use
OpenWRT with enterprise storage arrays.

Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
This patch is more of an RFC, I am in contact with the
author of BFQ if we need to discuss its applicability for
OpenWRT targets. I can make a kernel patch to make BFQ
the default IO scheduler as well.
---
 target/linux/generic/config-5.10 | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10
index 120d1d8c3f4a..fda3ef301dde 100644
--- a/target/linux/generic/config-5.10
+++ b/target/linux/generic/config-5.10
@@ -2601,8 +2601,7 @@ CONFIG_INPUT_MISC=y
 # CONFIG_INV_MPU6050_SPI is not set
 # CONFIG_IOMMU_SUPPORT is not set
 # CONFIG_IONIC is not set
-# CONFIG_IOSCHED_BFQ is not set
-# CONFIG_IOSCHED_CFQ is not set
+CONFIG_IOSCHED_BFQ=y
 CONFIG_IOSCHED_DEADLINE=y
 CONFIG_IOSCHED_NOOP=y
 CONFIG_IO_STRICT_DEVMEM=y
-- 
2.29.2




More information about the openwrt-devel mailing list