diff options
author | Tony Hutter <[email protected]> | 2022-06-09 07:10:38 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2022-06-09 08:10:38 -0600 |
commit | 6f73d02168ea4d4c27e95d3f23df7221c7321e07 (patch) | |
tree | 1fe119d60e4bd41c7fccbfaf0e3d220408ea60ef /tests/runfiles | |
parent | 985c33b132f6c23a69bd808e008ae0f46131a31e (diff) |
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 <[email protected]>
Reviewed-by: Ahelenia ZiemiaĆska <[email protected]>
Reviewed-by: Tony Nguyen <[email protected]>
Signed-off-by: Tony Hutter <[email protected]>
Closes #13148
Issue #12483
Diffstat (limited to 'tests/runfiles')
-rw-r--r-- | tests/runfiles/common.run | 6 | ||||
-rw-r--r-- | tests/runfiles/linux.run | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/tests/runfiles/common.run b/tests/runfiles/common.run index 243221598..89ee0d3cb 100644 --- a/tests/runfiles/common.run +++ b/tests/runfiles/common.run @@ -937,9 +937,13 @@ tags = ['functional', 'zvol', 'zvol_cli'] [tests/functional/zvol/zvol_misc] tests = ['zvol_misc_002_pos', 'zvol_misc_hierarchy', 'zvol_misc_rename_inuse', - 'zvol_misc_snapdev', 'zvol_misc_volmode', 'zvol_misc_zil'] + 'zvol_misc_snapdev', 'zvol_misc_trim', 'zvol_misc_volmode', 'zvol_misc_zil'] tags = ['functional', 'zvol', 'zvol_misc'] +[tests/functional/zvol/zvol_stress] +tests = ['zvol_stress'] +tags = ['functional', 'zvol', 'zvol_stress'] + [tests/functional/zvol/zvol_swap] tests = ['zvol_swap_001_pos', 'zvol_swap_002_pos', 'zvol_swap_004_pos'] tags = ['functional', 'zvol', 'zvol_swap'] diff --git a/tests/runfiles/linux.run b/tests/runfiles/linux.run index 3985da146..fa71f412b 100644 --- a/tests/runfiles/linux.run +++ b/tests/runfiles/linux.run @@ -184,3 +184,8 @@ tags = ['functional', 'user_namespace'] tests = ['groupspace_001_pos', 'groupspace_002_pos', 'groupspace_003_pos', 'userquota_013_pos', 'userspace_003_pos'] tags = ['functional', 'userquota'] + +[tests/functional/zvol/zvol_misc:Linux] +tests = ['zvol_misc_fua'] +tags = ['functional', 'zvol', 'zvol_misc'] + |