diff mbox series

[Bionic,v3,15/21] blk-mq: don't check queue mapped in __blk_mq_delay_run_hw_queue()

Message ID 20180515130324.23815-16-joserz@linux.vnet.ibm.com
State New
Headers show
Series blk-mq scheduler fixes | expand

Commit Message

Jose Ricardo Ziviani May 15, 2018, 1:03 p.m. UTC
From: Ming Lei <ming.lei@redhat.com>

BugLink: http://bugs.launchpad.net/bugs/1759723

There are several reasons for removing the check:

1) blk_mq_hw_queue_mapped() returns true always now since each hctx
may be mapped by one CPU at least

2) when there isn't any online CPU mapped to this hctx, there won't
be any IO queued to this CPU, blk_mq_run_hw_queue() only runs queue
if there is IO queued to this hctx

3) If __blk_mq_delay_run_hw_queue() is called by blk_mq_delay_run_hw_queue(),
which is run from blk_mq_dispatch_rq_list() or scsi_mq_get_budget(), and
the hctx to be handled has to be mapped.

Cc: Stefan Haberland <sth@linux.vnet.ibm.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
(cherry picked from commit efea8450c3d2d3918029b36f59ef612be57d91ae)
Signed-off-by: Jose Ricardo Ziviani <joserz@linux.ibm.com>
---
 block/blk-mq.c | 3 ---
 1 file changed, 3 deletions(-)
diff mbox series

Patch

diff --git a/block/blk-mq.c b/block/blk-mq.c
index 14053f521554..ffa19ff0a574 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1307,9 +1307,6 @@  static int blk_mq_hctx_next_cpu(struct blk_mq_hw_ctx *hctx)
 static void __blk_mq_delay_run_hw_queue(struct blk_mq_hw_ctx *hctx, bool async,
 					unsigned long msecs)
 {
-	if (WARN_ON_ONCE(!blk_mq_hw_queue_mapped(hctx)))
-		return;
-
 	if (unlikely(blk_mq_hctx_stopped(hctx)))
 		return;