Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zvol: Support blk-mq for better performance (updated) #13148

Merged
merged 1 commit into from
Jun 9, 2022

Commits on May 31, 2022

  1. 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).
    
    Signed-off-by: Tony Hutter <hutter2@llnl.gov>
    Issue openzfs#12483
    tonyhutter committed May 31, 2022
    Configuration menu
    Copy the full SHA
    5692b69 View commit details
    Browse the repository at this point in the history