mirror_zfs/module/os/linux/zfs
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
..
abd_os.c abd_os: remove redundant refcount creation for abd_children 2022-05-09 16:30:16 -07:00
arc_os.c Clean up CSTYLEDs 2022-01-26 11:38:52 -08:00
mmp_os.c Add zfs_multihost_interval tunable handler for FreeBSD 2020-06-23 13:32:42 -07:00
policy.c Fix ACL checks for NFS kernel server 2022-03-18 06:47:57 -06:00
qat_compress.c Modify checksum obtain method of QAT 2021-08-03 11:46:33 -06:00
qat_crypt.c Remove bcopy(), bzero(), bcmp() 2022-03-15 15:13:42 -07:00
qat.c QAT related bug fixes 2019-09-12 13:33:44 -07:00
spa_misc_os.c Add spa _os() hooks 2022-02-15 15:54:25 -08:00
trace.c Enable use of DTRACE_PROBE* macros in "spl" module 2019-11-01 13:13:43 -07:00
vdev_disk.c Linux 5.19 compat: blkdev_issue_secure_erase() 2022-05-31 12:04:26 -07:00
vdev_file.c module/*.ko: prune .data, global .rodata 2022-01-14 15:37:55 -08:00
zfs_acl.c Linux optimize access checks when ACL is trivial 2022-04-01 09:53:54 -07:00
zfs_ctldir.c Speed up WB_SYNC_NONE when a WB_SYNC_ALL occurs simultaneously 2022-05-03 13:23:26 -07:00
zfs_debug.c module/*.ko: prune .data, global .rodata 2022-01-14 15:37:55 -08:00
zfs_dir.c Remove bcopy(), bzero(), bcmp() 2022-03-15 15:13:42 -07:00
zfs_file_os.c file reference counts can get corrupted 2021-07-10 19:00:37 -06:00
zfs_ioctl_os.c linux: module: weld all but spl.ko into zfs.ko 2022-04-20 13:28:24 -07:00
zfs_racct.c module: zfs: fix unused, remove argsused 2021-12-23 09:42:47 -08:00
zfs_sysfs.c Linux 5.18 compat: kobj_type.default_attrs replaced with default_groups 2022-04-22 14:27:10 -07:00
zfs_uio.c zvol: Support blk-mq for better performance 2022-06-09 08:10:38 -06:00
zfs_vfsops.c Remove bcopy(), bzero(), bcmp() 2022-03-15 15:13:42 -07:00
zfs_vnops_os.c Speed up WB_SYNC_NONE when a WB_SYNC_ALL occurs simultaneously 2022-05-03 13:23:26 -07:00
zfs_znode.c Speed up WB_SYNC_NONE when a WB_SYNC_ALL occurs simultaneously 2022-05-03 13:23:26 -07:00
zio_crypt.c Remove bcopy(), bzero(), bcmp() 2022-03-15 15:13:42 -07:00
zpl_ctldir.c module: mark arguments used 2022-02-18 09:34:03 -08:00
zpl_export.c Return required size when encode_fh size too small 2021-05-07 15:08:16 -07:00
zpl_file.c Linux 5.19 compat: aops->read_folio() 2022-05-31 12:04:31 -07:00
zpl_inode.c Fix ACL checks for NFS kernel server 2022-03-18 06:47:57 -06:00
zpl_super.c Linux: Fix ZFS_ENTER/ZFS_EXIT/ZFS_VERFY_ZP usage 2020-11-14 10:19:00 -08:00
zpl_xattr.c Fix ACL checks for NFS kernel server 2022-03-18 06:47:57 -06:00
zvol_os.c zvol: Support blk-mq for better performance 2022-06-09 08:10:38 -06:00