# BFQ-4.8.0 patches now available

## wrc1944

For those interested, the BFQ-4.8.0 patches are now available.

ftp://teambelgium.net/bfq/patches

----------

## mpagano

We carry these in gentoo-sources.  USE=experimental

----------

## Hotblack

Maybe I'm not doing someting right, but from kernel 4.5 onwards, BFQ patches are not available anymore in gentoo-sources (even with experimental flag active)

Is that normal?

----------

## wrc1944

mpagano,

On 4.6.x, for some reason BFQ was never included in the gentoo-sources experimental patches. and as of today, it's still not in 4.7.0.

```

>>> Emerging (3 of 78) sys-kernel/gentoo-sources-4.7.0::gentoo

 * linux-4.7.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                              [ ok ]

 * genpatches-4.7-1.base.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                  [ ok ]

 * genpatches-4.7-1.extras.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                [ ok ]

 * genpatches-4.7-1.experimental.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                          [ ok ]

>>> Preparing to unpack ...

>>> Unpacking source...

>>> Unpacking linux-4.7.tar.xz to /var/tmp/portage/sys-kernel/gentoo-sources-4.7.0/work

>>> Unpacking genpatches-4.7-1.base.tar.xz to /var/tmp/portage/sys-kernel/gentoo-sources-4.7.0/work/patches

>>> Unpacking genpatches-4.7-1.extras.tar.xz to /var/tmp/portage/sys-kernel/gentoo-sources-4.7.0/work/patches

>>> Unpacking genpatches-4.7-1.experimental.tar.xz to /var/tmp/portage/sys-kernel/gentoo-sources-4.7.0/work/patches

 * Excluding Patch #5000_enable-additional-cpu-optimizations-for-gcc.patch ...                                                                        [ ok ]

 * Excluding Patch #5015_kdbus*.patch ...                                                                                                             [ ok ]

 * Applying 1500_XATTR_USER_PREFIX.patch (-p1) ...                                                                                                    [ ok ]

 * Applying 1510_fs-enable-link-security-restrictions-by-default.patch (-p1) ...                                                                      [ ok ]

 * Applying 2900_dev-root-proc-mount-fix.patch (-p1) ...                                                                                              [ ok ]

 * Applying 4200_fbcondecor-3.19.patch (-p1) ...                                                                                                      [ ok ]

 * Applying 4567_distro-Gentoo-Kconfig.patch (-p1) ...                                                                                                [ ok ]

 * Applying 5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch (-p1) ...                                                                      [ ok ]

>>> Source unpacked in /var/tmp/portage/sys-kernel/gentoo-sources-4.7.0/work

>>> Preparing source in /var/tmp/portage/sys-kernel/gentoo-sources-4.7.0/work/linux-4.7.0-gentoo ...

>>> Source prepared.

>>> Configuring source in /var/tmp/portage/sys-kernel/gentoo-sources-4.7.0/work/linux-4.7.0-gentoo ...

>>> Source configured.

>>> Compiling source in /var/tmp/portage/sys-kernel/gentoo-sources-4.7.0/work/linux-4.7.0-gentoo ...

>>> Source compiled.

>>> Test phase [not enabled]: sys-kernel/gentoo-sources-4.7.0

```

Hotblack,

Apparently, the BFQ team at the link I posted did not issue the 4.6.0 & 4.7.0 patch set for BFQ untill July 26-27. so maybe that explains why they were not in gentoo-sources.

If IRC, I had a problem applying the 02 patch to kernel 4.6.5 on line 47 yesterday, but now i see 4.6.0 has a july 28 date on the website, so maybe it's been fixed.

BTW, I found that the 4.5.0 patches also applied OK to all 4.5.x kernels, with no problems.

----------

## wrc1944

I can confirm all BFQ patches apply normally on 4.7.0.

```
gentoo-audio wrc # cd /usr/src/linux-4.7.0-gentoo

gentoo-audio linux-4.7.0-gentoo # patch -p1 < 0001-block-cgroups-kconfig-build-bits-for-BFQ-v7r11-4.7.0.patch

patching file block/Kconfig.iosched

patching file block/Makefile

patching file include/linux/blkdev.h

gentoo-audio linux-4.7.0-gentoo # 

gentoo-audio linux-4.7.0-gentoo # 

gentoo-audio linux-4.7.0-gentoo # patch -p1 < 0002-block-introduce-the-BFQ-v7r11-I-O-sched-for-4.7.0.patch

patching file block/Kconfig.iosched

patching file block/bfq-cgroup.c

patching file block/bfq-ioc.c

patching file block/bfq-iosched.c

patching file block/bfq-sched.c

patching file block/bfq.h

gentoo-audio linux-4.7.0-gentoo # 

gentoo-audio linux-4.7.0-gentoo # 

gentoo-audio linux-4.7.0-gentoo # patch -p1 < 0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r11-for.patch

patching file block/bfq-cgroup.c

patching file block/bfq-iosched.c

patching file block/bfq.h

gentoo-audio linux-4.7.0-gentoo # 

gentoo-audio linux-4.7.0-gentoo # 

gentoo-audio linux-4.7.0-gentoo # patch -p1 < 0004-block-bfq-turn-BFQ-v7r11-for-4.7.0-into-BFQ-v8-for-4.patch

patching file block/Kconfig.iosched

patching file block/bfq-cgroup.c

patching file block/bfq-iosched.c

patching file block/bfq-sched.c

patching file block/bfq.h

gentoo-audio linux-4.7.0-gentoo #  
```

----------

## mpagano

I just put them in.  They'll be in the next release of 4.7 (4.7.1) and 4.6 (4.6.6)

----------

## wrc1944

mpagano,

Thanks much!   :Very Happy: 

That will save BFQ fans from having to download all the patches from the teambelgium.net page and do it themselves.

----------

## mirekm

Is there a chance, that these patches will be included in hardened sources, or are they incompatible?

----------

## kharitonow

Be aware that the bfq v8 patch causes freezes and/or kernel panics. This bug is discussed at this page: https://groups.google.com/forum/#!topic/bfq-iosched/80V4U6ak57w

And one additional patch from this discussion thread fixed freezes for me

https://05090054213627358336.googlegroups.com/attach/81df4b74080cb/0001-Change-suspect-BUG_ON-and-add-more-BUG_ONs.patch?part=0.1&view=1&vt=ANaJVrEWpnvL-mcT_EfPMsf-yclgTcf9VyI0zSgodVE1OiIW1CHC46EKPfM5_5_4JU-rFOVIo2fathpSrOc0_DI9QC6OfGSC2CMFcSDGonuk2JA288dvmbI

----------

## wrc1944

For those interseted, the BFQ patches for 4.8.0 and I assume 4.8.x forward are avaialable:  

ftp://teambelgium.net/bfq/patches/4.8.0-v8r4/

----------

## mpagano

Feel free to ping me on IRC for the BFQ patchset releases, I'm not that active on the forums and I don't get any automatic notices of bfq releases.

commit 5f366798d7e0ab4865e24b35e1f3af8b438d9d4b

Author: Mike Pagano <mpagano@gentoo.org>

Date:   Sun Oct 23 09:59:25 2016 -0400

    BFQ patchset for 4.8 v7r11.

-Mike

----------

## wrc1944

Here's a nice detailed LWN kernel patch page article on BFQ features posted Oct.26, 2016:  http://lwn.net/Articles/704648/

"Introduce the BFQ-v0 I/O scheduler as an extra scheduler"

(Paolo Valente, the BFQ creator sent this to Jens Axboe, of kernel.org)

If you like and use BFQ, this is a must read.  I'm hoping BFQ will soon be added to the kernel default options.

http://lwn.net/Kernel/Patches

----------

