[PATCH] RFC: kernel: Remove CFQ activate BFQ

Rosen Penev rosenp at gmail.com
Wed Apr 14 23:45:54 BST 2021


On Wed, Apr 14, 2021 at 4:46 AM Linus Walleij <linus.walleij at linaro.org> wrote:
>
> 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.
This should be tested first.

Most OpenWrt routers use squashfs with a jffs2 overlay. Last I tested,
there was no difference in speed. There would be when using USB or
SATA connected drives.
>
> 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.
Last time I posted a patch messing with IOSCHED it got rejected.
Specifically because it removed all io schedulers except noop, which
seems to perform equal to CFQ last I tested.
> ---
>  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
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list