zfs/tests/zfs-tests/include
Tony Hutter 6f73d02168
zvol: Support blk-mq for better performance
Add support for the kernel's block multiqueue (blk-mq) interface in
the zvol block driver.  blk-mq creates multiple request queues on
different CPUs rather than having a single request queue.  This can
improve zvol performance with multithreaded reads/writes.

This implementation uses the blk-mq interfaces on 4.13 or newer
kernels.  Building against older kernels will fall back to the
older BIO interfaces.

Note that you must set the `zvol_use_blk_mq` module param to
enable the blk-mq API.  It is disabled by default.

In addition, this commit lets the zvol blk-mq layer process whole
`struct request` IOs at a time, rather than breaking them down
into their individual BIOs.  This reduces dbuf lock contention
and overhead versus the legacy zvol submit_bio() codepath.

	sequential dd to one zvol, 8k volblocksize, no O_DIRECT:

	legacy submit_bio()     292MB/s write  453MB/s read
	this commit             453MB/s write  885MB/s read

It also introduces a new `zvol_blk_mq_chunks_per_thread` module
parameter. This parameter represents how many volblocksize'd chunks
to process per each zvol thread.  It can be used to tune your zvols
for better read vs write performance (higher values favor write,
lower favor read).

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #13148
Issue #12483
2022-06-09 08:10:38 -06:00
..
.gitignore Add zpool events tests 2017-05-22 12:34:42 -04:00
blkdev.shlib tests: include: use already-set $UNAME instead of shelling out to uname each time 2022-04-01 18:02:59 -07:00
commands.cfg zvol: Support blk-mq for better performance 2022-06-09 08:10:38 -06:00
default.cfg.in tests: standardise on no-arg uname with *) case for illumos 2022-04-01 17:54:52 -07:00
libtest.shlib zvol: Support blk-mq for better performance 2022-06-09 08:10:38 -06:00
math.shlib tests: include: math: simplify bc conditions, review $? 2022-04-01 17:59:24 -07:00
properties.shlib Introduce BLAKE3 checksums as an OpenZFS feature 2022-06-08 15:55:57 -07:00
tunables.cfg zvol: Support blk-mq for better performance 2022-06-09 08:10:38 -06:00
zpool_script.shlib tests: review every awk(1) invocation 2022-04-01 17:57:55 -07:00