Skip to content

Commit 03f26d8

Browse files
Ming Leiaxboe
authored andcommitted
blk-mq: plug request for shared sbitmap
In case of shared sbitmap, request won't be held in plug list any more sine commit 32bc15a ("blk-mq: Facilitate a shared sbitmap per tagset"), this way makes request merge from flush plug list & batching submission not possible, so cause performance regression. Yanhui reports performance regression when running sequential IO test(libaio, 16 jobs, 8 depth for each job) in VM, and the VM disk is emulated with image stored on xfs/megaraid_sas. Fix the issue by recovering original behavior to allow to hold request in plug list. Cc: Yanhui Ma <yama@redhat.com> Cc: John Garry <john.garry@huawei.com> Cc: Bart Van Assche <bvanassche@acm.org> Cc: kashyap.desai@broadcom.com Fixes: 32bc15a ("blk-mq: Facilitate a shared sbitmap per tagset") Signed-off-by: Ming Lei <ming.lei@redhat.com> Link: https://lore.kernel.org/r/20210514022052.1047665-1-ming.lei@redhat.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 6bdf2fb commit 03f26d8

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

block/blk-mq.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2232,8 +2232,9 @@ blk_qc_t blk_mq_submit_bio(struct bio *bio)
22322232
/* Bypass scheduler for flush requests */
22332233
blk_insert_flush(rq);
22342234
blk_mq_run_hw_queue(data.hctx, true);
2235-
} else if (plug && (q->nr_hw_queues == 1 || q->mq_ops->commit_rqs ||
2236-
!blk_queue_nonrot(q))) {
2235+
} else if (plug && (q->nr_hw_queues == 1 ||
2236+
blk_mq_is_sbitmap_shared(rq->mq_hctx->flags) ||
2237+
q->mq_ops->commit_rqs || !blk_queue_nonrot(q))) {
22372238
/*
22382239
* Use plugging if we have a ->commit_rqs() hook as well, as
22392240
* we know the driver uses bd->last in a smart fashion.

0 commit comments

Comments
 (0)