]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
block, bfq: move debug blkio stats behind CONFIG_DEBUG_BLK_CGROUP
authorLuca Miccio <lucmiccio@gmail.com>
Mon, 13 Nov 2017 06:34:10 +0000 (07:34 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 15 Nov 2017 03:13:33 +0000 (20:13 -0700)
commita33801e8b4735b8d473f963e5854172f9cde3e8b
treeacebf1dbfbe5effb178f76d31b841b9fb24f45fd
parent24bfd19bb7890255693ee5cb6dc100d8d215d00b
block, bfq: move debug blkio stats behind CONFIG_DEBUG_BLK_CGROUP

BFQ currently creates, and updates, its own instance of the whole
set of blkio statistics that cfq creates. Yet, from the comments
of Tejun Heo in [1], it turned out that most of these statistics
are meant/useful only for debugging. This commit makes BFQ create
the latter, debugging statistics only if the option
CONFIG_DEBUG_BLK_CGROUP is set.

By doing so, this commit also enables BFQ to enjoy a high perfomance
boost. The reason is that, if CONFIG_DEBUG_BLK_CGROUP is not set, then
BFQ has to update far fewer statistics, and, in particular, not the
heaviest to update.  To give an idea of the benefits, if
CONFIG_DEBUG_BLK_CGROUP is not set, then, on an Intel i7-4850HQ, and
with 8 threads doing random I/O in parallel on null_blk (configured
with 0 latency), the throughput of BFQ grows from 310 to 400 KIOPS
(+30%). We have measured similar or even much higher boosts with other
CPUs: e.g., +45% with an ARM CortexTM-A53 Octa-core. Our results have
been obtained and can be reproduced very easily with the script in [1].

[1] https://www.spinics.net/lists/linux-block/msg18943.html

Suggested-by: Tejun Heo <tj@kernel.org>
Suggested-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Lee Tibbert <lee.tibbert@gmail.com>
Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Signed-off-by: Luca Miccio <lucmiccio@gmail.com>
Signed-off-by: Paolo Valente <paolo.valente@linaro.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Documentation/block/bfq-iosched.txt
block/bfq-cgroup.c
block/bfq-iosched.c
block/bfq-iosched.h