Package Details: linux-bfq-mq 4.19.2-1

Git Clone URL: https://aur.archlinux.org/linux-bfq-mq.git (read-only)
Package Base: linux-bfq-mq
Description: The Linux-bfq-mq kernel and modules with the BFQ-MQ scheduler
Upstream URL: https://github.com/Algodev-github/bfq-mq/
Licenses: GPL2
Provides: linux=4.19.2, linux-bfq-mq=4.19.2
Submitter: monotykamary
Maintainer: monotykamary (sir_lucjan)
Last Packager: sir_lucjan
Votes: 6
Popularity: 0.086172
First Submitted: 2017-05-11 19:00
Last Updated: 2018-11-14 13:00

Dependencies (12)

Required by (191)

Sources (11)

Pinned Comments

monotykamary commented on 2017-05-14 16:02

IO scheduler will default to "mq-deadline" given that DEFAULT_MQ_IOSCHED is currently not implemented in mainline. For now, you can use `sudo tee /sys/block/sda/queue/scheduler <<< bfq-mq` to enable "bfq-mq".

You can also add this to your udev rules:
```
# Non-rotational disks
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="bfq-mq"
# Rotational disks
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="bfq-mq"
```

`sudo udevadm control --reload && sudo udevadm trigger`

Configs are left at Arch default and v4.12 defaults except for the following definitions:

CONFIG_IOSCHED_BFQ=y
CONFIG_BFQ_GROUP_IOSCHED=y
CONFIG_DEFAULT_BFQ=y
CONFIG_DEFAULT_IOSCHED="bfq-sq"
CONFIG_MQ_IOSCHED_BFQ=y
CONFIG_MQ_BFQ_GROUP_IOSCHED=y

`config.i686` was made in deselecting x64 in `make xconfig`, but has not been tested.

The patch (4.12-bfq-mq-*.patch) is formatted from `git format-patch 87b2c3fc6317` straight from a local clone of https://github.com/Algodev-github/bfq-mq. Makefile commits are now kept in newer patches for use of sir_lucjan's Makefile stream edits.

Latest Comments

1 2 3 Next › Last »

test0 commented on 2018-09-23 15:25

I'm sorry for trouble, I'm mess up my PKGBUILD. Now I see where it's applying and why it's not working for me. Anyway thank you for your reply. I will remove my comment below.

sir_lucjan commented on 2018-09-23 15:07

  -> Setting version...
  -> Applying patch enable_additional_cpu_optimizations_for_gcc_v8.1+_kernel_v4.13+.patch...
patching file arch/x86/include/asm/module.h
patching file arch/x86/Kconfig.cpu
patching file arch/x86/Makefile
Hunk #1 succeeded at 123 (offset -1 lines).
patching file arch/x86/Makefile_32.cpu
  -> Applying patch 4.18-bfq-sq-mq-v9r1-2K180915.patch...
patching file Documentation/block/bfq-iosched.txt
patching file block/Kconfig.iosched
patching file block/Makefile
patching file block/bfq-cgroup-included.c
patching file block/bfq-ioc.c
patching file block/bfq-mq-iosched.c
patching file block/bfq-mq.h
patching file block/bfq-sched.c
patching file block/bfq-sq-iosched.c
patching file block/bfq.h
patching file include/linux/blkdev.h
  -> Applying patch 0100-Check-presence-on-tree-of-every-entity-after-every-a.patch...
patching file block/bfq-sched.c
Hunk #1 succeeded at 1332 with fuzz 1 (offset 48 lines).
Hunk #2 succeeded at 1350 (offset 49 lines).
  -> Applying patch 0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch...
patching file kernel/fork.c
Hunk #2 succeeded at 1630 (offset 1 line).
Hunk #3 succeeded at 2430 (offset 1 line).
patching file kernel/sysctl.c
patching file kernel/user_namespace.c

Works fine....

sir_lucjan commented on 2018-01-29 21:56

@Mthw

not out of date until 4.15.x hits to [core]

test0 commented on 2017-11-26 10:59

@monotykamary:

Now everything is clear, thank you very much for the explanation.

monotykamary commented on 2017-11-26 09:30

@test0

That should be correct. [noop, deadline, cfq] are single-queue IO schedulers and [mq-deadline, kyber, bfq, none] are multi-queue IO schedulers. In terms of how the patch is applied, there are no problems as to where bfq-sq and bfq-mq are applied.

As to why this is happening is because in this this pkgbase, we use config options `CONFIG_DM_MQ_DEFAULT=y` and `CONFIG_SCSI_MQ_DEFAULT=y` which enables multi-queue IO scheduling by default. If you would like to revert to single-queue IO scheduling without recompiling the package, you can use the kernel bootline options `scsi_mod.use_blk_mq=n dm_mod.use_blk_mq=n`.

Probably prior to 4.14.2, these config options were probably disabled and may have been re-enabled after the package resync. EDIT: More specifically in this commit: https://aur.archlinux.org/cgit/aur.git/commit/?h=linux-bfq-mq&id=bd6e5f752a538c1783bf75ac5f5a33c5c6905dbf

test0 commented on 2017-11-26 09:16

So I have dug a bit more. I usually build linux-bfq-mq with '_localmodcfg=y', this is the only change I make to the vanilla PKGBUILD. For previous version of linux-bfq-mq 4.13.11-1, which was build with '_localmodcfg=y', after reboot I have:

$ cat /sys/block/sda/queue/scheduler
noop deadline cfq [bfq-sq]

$ zgrep IOSCHED /proc/config.gz
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
CONFIG_CFQ_GROUP_IOSCHED=y
CONFIG_IOSCHED_BFQ_SQ=y
CONFIG_BFQ_SQ_GROUP_IOSCHED=y
CONFIG_DEFAULT_IOSCHED="bfq-sq"
CONFIG_MQ_IOSCHED_BFQ=y
CONFIG_MQ_BFQ_GROUP_IOSCHED=y
CONFIG_MQ_IOSCHED_DEADLINE=y
CONFIG_MQ_IOSCHED_KYBER=y
CONFIG_IOSCHED_BFQ=y
CONFIG_BFQ_GROUP_IOSCHED=y

However with linux-bfq-mq 4.14.2-3 with or without '_localmodcfg=y' after reboot I have:

$ cat /sys/block/sda/queue/scheduler
[mq-deadline] kyber bfq bfq-mq none

$ zgrep IOSCHED /proc/config.gz
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
CONFIG_CFQ_GROUP_IOSCHED=y
CONFIG_IOSCHED_BFQ_SQ=y
CONFIG_BFQ_SQ_GROUP_IOSCHED=y
CONFIG_DEFAULT_IOSCHED="bfq-sq"
CONFIG_MQ_IOSCHED_BFQ=y
CONFIG_MQ_BFQ_GROUP_IOSCHED=y
CONFIG_MQ_IOSCHED_DEADLINE=y
CONFIG_MQ_IOSCHED_KYBER=y
CONFIG_IOSCHED_BFQ=y
CONFIG_BFQ_GROUP_IOSCHED=y

Maybe I something messed up, but I'm not aware what this can be. I have always built every version of linux-bfq-mq package in the same way, but starting from 4.14.2 version there is something wrong with elevator's names (in fact I should assume starting from 4.14 version, because it's very improbable that minor version change has any impact on this issue).

sir_lucjan commented on 2017-11-25 12:00

@test0 - sorry, that was my bad.

But...

@@ -63,6 +93,7 @@ config DEFAULT_IOSCHED
string
default "deadline" if DEFAULT_DEADLINE
default "cfq" if DEFAULT_CFQ
+ default "bfq-sq" if DEFAULT_BFQ_SQ
default "noop" if DEFAULT_NOOP

You're wrong.

sir_lucjan commented on 2017-11-25 12:00

@test0 - sorry, that was my bad.

But...

@@ -63,6 +93,7 @@ config DEFAULT_IOSCHED
string
default "deadline" if DEFAULT_DEADLINE
default "cfq" if DEFAULT_CFQ
+ default "bfq-sq" if DEFAULT_BFQ_SQ
default "noop" if DEFAULT_NOOP

You're wrong.

monotykamary commented on 2017-11-25 10:32

@test0

I have added back the _srcpatch variable to SUBLEVEL which will point to the correct patch version to fix the apply error.

As for CONFIG_DEFAULT_IOSCHED, there doesn't seem to be any change from upstream bfq-mq[1][2] that shows bfq-sq or its conditionals were removed. However, bfq-sq was removed from blk-mq[3] some time ago.

--
[1] https://github.com/Algodev-github/bfq-mq/blob/bb4162667e471c0a63fdc9c4ee1b7899331f1f18/block/bfq-sq-iosched.c
[2] https://github.com/Algodev-github/bfq-mq/blob/abdfb33a3325df55ec0261fd824ca61ddac13575/block/Kconfig.iosched
[3] https://github.com/Algodev-github/bfq-mq/commit/cf794d80a7f88faff3a4ca37d3cda1a2391ccab1#diff-0e55bac8567a89d2861df16ed50bbd34L5325

test0 commented on 2017-11-25 09:46

@sir_lucjan:

Please adjust 'SUBLEVEL' in the PKGBUILD, otherwise bfq patch is applying incorrectly. There should be line:
"s|SUBLEVEL = 0|SUBLEVEL = 2|g"

Also please adjust 'CONFIG_DEFAULT_IOSCHED' in the config, because with the newer bfq patch there is no "bfq-sq" elevator name anymore. Available elevator names are 'bfq' or 'bfq-mq', otherwise by default 'mq-deadline' is selected.

Best regards.