Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 657570 - >=sys-kernel/gentoo-sources-4.10 BFQ IO scheduler cannot be selected
Summary: >=sys-kernel/gentoo-sources-4.10 BFQ IO scheduler cannot be selected
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-08 04:30 UTC by deterenkelt
Modified: 2019-05-16 19:05 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description deterenkelt 2018-06-08 04:30:31 UTC
The issue is already explained in details here: https://forums.gentoo.org/viewtopic-t-1065726-start-0.html

I can add, that in gentoo-sources-4.9.x BFQ still can be selected and elevator kernel option works.

I have enabled 
CONFIG_SCSI_MQ_DEFAULT=y
CONFIG_DM_MQ_DEFAULT=y
and applied the patch https://patchwork.kernel.org/patch/9825423/, but I suspect that the latter does purely cosmetic changes. In gentoo-sources-4.17.0 elevator kernel option doesn’t work: though BFQ is listed among the available schedulers, “noop” is selected for SSD and HDD drives. Setting in manually with

for drive_scheduler in /sys/block/sd*/queue/scheduler; do
        echo bfq > $drive_scheduler
done

Seems to work, at least the are no instant error messages.
Comment 1 Mike Pagano gentoo-dev 2018-07-23 19:35:18 UTC
That link does not resolve and I'm not sure what it does since I can't see it. 

With a pure gentoo-sources kernel, are you telling me you can't select BFQ ?
Comment 2 deterenkelt 2018-07-24 00:53:32 UTC
Yes. The patch is but several lines that do cosmetic, BFQ still has to be enabled with a local.d script (shown above).

I’m on 4.17.0 now.
Comment 3 Mike Pagano gentoo-dev 2018-07-24 22:45:33 UTC
what patch? I get a 404.

What local script above?
Comment 4 deterenkelt 2018-07-24 23:36:09 UTC
> what patch? I get a 404.

I didn’t save it. But it was changing the order of menu items in IO schedulers section in menuconfig and added BFQ to the list of selectable schedulers.

The list of IO schedulers in menuconfig by default looked like
Deadline, CFQ, <submenu to choose default IO scheduler>, MQ, Kyber, BFQ. The patch put the submenu before all schedulers and made them selectable (the ability to be selected doesn’t depend on the item position in the list, however). As it was already said, the patch did only cosmetic changes in menuconfig, the kernel ignored those settings anyway. I’ve tried to boot the kernel without elevator=bfq and with it – but after the boot was finished and I could log in, all the drives had CFQ. An initramfs can not be an issue with the “elevator” option, for I don’t use any initramfs at the moment – grub loads kernel directly.

> What local script above?

Because the kernel ignored the chosen IO scheduler even with the elevator option, the only way to select it was to operate on /sys/. I had to write a short shell script and put it in /etc/local.d/bfq-selection.start

    #! /bin/bash                                                                                                         

    for drive_scheduler in /sys/block/sd*/queue/scheduler; do
        echo bfq > $drive_scheduler
    done

    exit 0

Hope this clears the situation more, this is all I can add.
Comment 5 deterenkelt 2018-07-24 23:38:01 UTC
In “put the submenu before all schedulers”
s/before/after/
Comment 6 Mike Pagano gentoo-dev 2019-05-16 19:05:14 UTC
BFQ is now included in the upstream kernel