aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2018-01-11 14:01:55 +0800
committerMike Snitzer <snitzer@redhat.com>2018-01-11 23:18:11 -0500
commit5b18cff4baedde77e0d69bd62a13ae78f9488d89 (patch)
tree6e3d0fe9199bf8f28baa634658e947c63ccba683
parent9141711fc598387e0b2caef20ec29d7afe2673bb (diff)
downloadlinux-dm-5b18cff4baedde77e0d69bd62a13ae78f9488d89.tar.gz
dm mpath: don't call blk_mq_delay_run_hw_queue() in case of BLK_STS_RESOURCE
Notice: this object is not reachable from any branch.
If .queue_rq() returns BLK_STS_RESOURCE, blk-mq will rerun the queue in these three situations: 1) if BLK_MQ_S_SCHED_RESTART is set - queue is rerun after one rq is completed, see blk_mq_sched_restart() which is run from blk_mq_free_request() 2) run out of driver tag - queue is rerun after one tag is freed 3) otherwise - queue is run immediately in blk_mq_dispatch_rq_list() dm-mpath's random (100ms) delayed running of hw queue was introduced by commit 6077c2d706097c0 ("dm rq: Avoid that request processing stalls sporadically"), but it never explained the reasoning behind it. At best it was a workaround. And calling blk_mq_delay_run_hw_queue() inside .queue_rq() is a horrible hack because it breaks BLK_MQ_S_SCHED_RESTART, which degrades I/O peformance a lot. So remove it. It is also very likely that commit eb619fdb2d4cb ("blk-mq: fix issue with shared tag queue re-running") genuinely fixes the root cause of the issue that commit 6077c2d706097c0 was trying to workaround. Signed-off-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Notice: this object is not reachable from any branch.
-rw-r--r--drivers/md/dm-rq.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/md/dm-rq.c b/drivers/md/dm-rq.c
index 9d32f25489c27..cbe8a06ef8b01 100644
--- a/drivers/md/dm-rq.c
+++ b/drivers/md/dm-rq.c
@@ -758,7 +758,6 @@ static blk_status_t dm_mq_queue_rq(struct blk_mq_hw_ctx *hctx,
/* Undo dm_start_request() before requeuing */
rq_end_stats(md, rq);
rq_completed(md, rq_data_dir(rq), false);
- blk_mq_delay_run_hw_queue(hctx, 100/*ms*/);
return BLK_STS_RESOURCE;
}