On Thu, Jan 11 2018 at 1:01am -0500, Ming Lei <ming.lei@xxxxxxxxxx> wrote: > blk_insert_cloned_request() is called in fast path of dm-rq driver, and > in this function we append request to hctx->dispatch_list of the underlying > queue directly. > > 1) This way isn't efficient enough because hctx lock is always required > > 2) With blk_insert_cloned_request(), we bypass underlying queue's IO scheduler > totally, and depend on DM rq driver to do IO schedule completely. But DM > rq driver can't get underlying queue's dispatch feedback at all, and this > information is extreamly useful for IO merge. Without that IO merge can't > be done basically by blk-mq, and causes very bad sequential IO performance. > > This patch makes use of blk_mq_try_issue_directly() to dispatch rq to > underlying queue and provides disptch result to dm-rq and blk-mq, and > improves the above situations very much. > > With this patch, seqential IO is improved by 3X in my test over > mpath/virtio-scsi. > > Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxx> Tested-by: Mike Snitzer <snitzer@xxxxxxxxxx> Reviewed-by: Mike Snitzer <snitzer@xxxxxxxxxx>