mirror_zfs/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
..
os zvol: Support blk-mq for better performance 2022-06-09 08:10:38 -06:00
sys Introduce BLAKE3 checksums as an OpenZFS feature 2022-06-08 15:55:57 -07:00
.gitignore OpenZFS restructuring - move platform specific sources 2019-09-06 11:26:26 -07:00
cityhash.h libzfs: convert to -fvisibility=hidden 2021-06-03 13:17:55 -07:00
libnvpair.h lib{efi,avl,share,tpool,zfs_core,zfsbootenv,zutil}: -fvisibility=hidden 2021-06-09 17:04:32 -07:00
libuutil_common.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
libuutil_impl.h Replace /*PRINTFLIKEn*/ with attribute(printf) 2021-07-26 12:07:15 -07:00
libuutil.h Switch from _Noreturn to __attribute__((noreturn)) 2022-03-23 08:51:00 -07:00
libzfs_core.h libzfs, libzfs_core: send: always write to pipe 2022-03-08 09:33:08 -08:00
libzfs.h libzfs: return (allocated) strings instead of filling buffers 2022-05-18 12:52:10 -07:00
libzfsbootenv.h lib{efi,avl,share,tpool,zfs_core,zfsbootenv,zutil}: -fvisibility=hidden 2021-06-09 17:04:32 -07:00
libzutil.h libzfs: constify zfs_strip_partition(), zfs_strip_path() 2022-05-16 15:56:53 -07:00
Makefile.am Introduce BLAKE3 checksums as an OpenZFS feature 2022-06-08 15:55:57 -07:00
thread_pool.h libspl/include: remove unused/empty headers 2022-05-18 12:10:43 -07:00
zfeature_common.h Introduce BLAKE3 checksums as an OpenZFS feature 2022-06-08 15:55:57 -07:00
zfs_comutil.h module/*.ko: prune .data, global .rodata 2022-01-14 15:37:55 -08:00
zfs_deleg.h module/*.ko: prune .data, global .rodata 2022-01-14 15:37:55 -08:00
zfs_fletcher.h Add --enable-asan and --enable-ubsan switches 2022-02-03 14:35:38 -08:00
zfs_namecheck.h libzfs: convert to -fvisibility=hidden 2021-06-03 13:17:55 -07:00
zfs_prop.h Flex non-pretty-printed properties and raw-/pretty-print remaining ones 2022-03-04 12:08:33 -08:00