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

Jose Ricardo Ziviani joserz at linux.vnet.ibm.com
Tue May 15 13:03:18 UTC 2018


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

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;
 
-- 
2.17.0





More information about the kernel-team mailing list