[PATCH] RFC: kernel: Remove CFQ activate BFQ

Linus Walleij linus.walleij at linaro.org
Thu Apr 15 00:29:05 BST 2021

On Thu, Apr 15, 2021 at 12:45 AM Rosen Penev <rosenp at gmail.com> wrote:
> On Wed, Apr 14, 2021 at 4:46 AM Linus Walleij <linus.walleij at linaro.org> wrote:

> > 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.

Yeah I have tested it a lot. Running it on a host of Arm systems
as we worked with the author, also stress tested with iozone
for example. It's quite stable now and Fedora trust it enough
to enable it by default.

> 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.

BFQ isn't really about speed, but latency.

OpenWRT is a bit ambiguous about separating router and
NAS usecases, for routers I agree, no big deal, but for NAS
devices, BFQ will detect interactive loads. This happens
for example when a user is streaming a movie from a
drive, then other IO will be deprioritized and the interactive
video stream will be prioritized and less prone to skip.

I asked Paolo at some point whether interaction over
the network (Samba, NFS) will be detected if interactive
and yes, it should do that. It is really all about the
behaviour of the process, such as smbd/nfsd.

Another factor is that BFQ helps to not bring down a system
which starts thrashing to swap. I blogged about it here:
Essentially it will priotitize the interactive shell over the thrashing
processes. This is maybe more esoteric but sometimes
a life-saver.

> 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.

It seems they are all in a module package now which is
neat, I can probably augment the patch to just delete CFQ
from the v5.10 config I guess, MQ_DEADLINE will be the
default anyway.

Linus Walleij

More information about the openwrt-devel mailing list