blk-mq: insert request not through ->queue_rq into sw/scheduler queue
PATCH 1/1 blk-mq: insert request not through ->queue_rq into sw/scheduler queue
c616cbee97ae ("blk-mq: punt failed direct issue to dispatch list") supposed to add request which has been through ->queue_rq() to the hw queue dispatch list, however it adds request running out of budget or driver tag to hw queue too. This way basically bypasses request merge, and causes too many request dispatched to LLD, and system% is unnecessary increased.
Fixes this issue by adding request not through ->queue_rq into sw/scheduler queue, and this way is safe because no ->queue_rq is called on this request yet.
High %system can be observed on Azure storvsc device, and even soft lock is observed. This patch reduces %system during heavy sequential IO, meantime decreases soft lockup risk.
--- block/blk-mq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
block/blk-mq.c +2 -1
@@ -2016,7 +2016,8 @@ static blk_status_t __blk_mq_try_issue_directly(struct blk_mq_hw_ctx *hctx,if (bypass_insert)return BLK_STS_RESOURCE ; -blk_mq_request_bypass_insert (rq, false, run_queue); +blk_mq_sched_insert_request (rq, false, run_queue, false); +return BLK_STS_OK ; }
Signature · 1 line
2.25.2
Quoted 27 lines · Ming Lei
c616cbee97ae("blk-mq: punt failed direct issue to dispatch list") supposed to add request which has been through ->queue_rq() to the hw queue dispatch list, however it adds request running out of budget or driver tag to hw queue too. This way basically bypasses request merge, and causes too many request dispatched to LLD, and system% is unnecessary increased.Fixes this issue by adding request not through ->queue_rq into sw/scheduler queue, and this way is safe because no ->queue_rq is called on this request yet.
High %system can be observed on Azure storvsc device, and even soft lock is observed. This patch reduces %system during heavy sequential IO, meantime decreases soft lockup risk.
Cc Bart Van Assche <[email protected]>Cc Mike Snitzer <[email protected]>Fixes c616cbee97ae ("blk-mq: punt failed direct issue to dispatch list")Signed-off-by Ming Lei <[email protected]>--- block/blk-mq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)block/blk-mq.c +0
-0
block/blk-mq.c static blk_status_t __blk_mq_try_issue_directly(struct blk_mq_hw_ctx *hctx, · line 2023
Quoted 9 lines
block/blk-mq.c +2
-1@@ -2016,7 +2016,8 @@ static blk_status_t __blk_mq_try_issue_directly(struct blk_mq_hw_ctx *hctx,if (bypass_insert)return BLK_STS_RESOURCE ; -blk_mq_request_bypass_insert (rq, false, run_queue); +blk_mq_sched_insert_request (rq, false, run_queue, false); +return BLK_STS_OK ; }
Hello Guys,
Ping...
thanks,
Ming