]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit - block/blk-mq.c
blk-mq: insert request not through ->queue_rq into sw/scheduler queue
authorMing Lei <ming.lei@redhat.com>
Tue, 18 Aug 2020 09:07:28 +0000 (17:07 +0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 16 Sep 2020 09:15:01 +0000 (05:15 -0400)
commita4313913c4fa2751feaec83f24c0279a1cab960d
tree1cf547622ed4e7cd4d63c5d157c0313eeb4e89a2
parent3ecccdce6db01303f19c8a2622bf53344c6a4609
blk-mq: insert request not through ->queue_rq into sw/scheduler queue

BugLink: https://bugs.launchpad.net/bugs/1895174
[ Upstream commit db03f88fae8a2c8007caafa70287798817df2875 ]

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.

Fixes: c616cbee97ae ("blk-mq: punt failed direct issue to dispatch list")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Bart Van Assche <bvanassche@acm.org>
Cc: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
block/blk-mq.c