All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] blk-mq: only run mapped hw queues in blk_mq_run_hw_queues()
@ 2018-03-28  1:20 Ming Lei
  2018-03-28  3:22 ` Jens Axboe
  0 siblings, 1 reply; 40+ messages in thread
From: Ming Lei @ 2018-03-28  1:20 UTC (permalink / raw)
  To: Jens Axboe
  Cc: linux-block, Christoph Hellwig, Stefan Haberland,
	Christian Borntraeger, Ming Lei, Christoph Hellwig

>From commit 20e4d813931961fe ("blk-mq: simplify queue mapping & schedule
with each possisble CPU") on, it should be easier to see unmapped hctx
in some CPU topo, such as, hctx may not be mapped to any CPU.

This patch avoids the warning in __blk_mq_delay_run_hw_queue() by
checking if the hctx is mapped in blk_mq_run_hw_queues().

blk_mq_run_hw_queues() is often run in SCSI or some driver's completion
path, so this warning has to be addressed.

Reported-by: Stefan Haberland <sth@linux.vnet.ibm.com>
Cc: Christoph Hellwig <hch@lst.de>
Fixes: 20e4d813931961fe ("blk-mq: simplify queue mapping & schedule with each possisble CPU")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
---
 block/blk-mq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-mq.c b/block/blk-mq.c
index 16e83e6df404..48f25a63833b 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1459,7 +1459,7 @@ void blk_mq_run_hw_queues(struct request_queue *q, bool async)
 	int i;
 
 	queue_for_each_hw_ctx(q, hctx, i) {
-		if (blk_mq_hctx_stopped(hctx))
+		if (blk_mq_hctx_stopped(hctx) || !blk_mq_hw_queue_mapped(hctx))
 			continue;
 
 		blk_mq_run_hw_queue(hctx, async);
-- 
2.9.5

^ permalink raw reply related	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2018-04-06 15:40 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-28  1:20 [PATCH] blk-mq: only run mapped hw queues in blk_mq_run_hw_queues() Ming Lei
2018-03-28  3:22 ` Jens Axboe
2018-03-28  7:45   ` Christian Borntraeger
2018-03-28 14:38     ` Jens Axboe
2018-03-28 14:53       ` Jens Axboe
2018-03-28 15:38         ` Christian Borntraeger
2018-03-28 15:26     ` Ming Lei
2018-03-28 15:36       ` Christian Borntraeger
2018-03-28 15:44         ` Christian Borntraeger
2018-03-29  2:00         ` Ming Lei
2018-03-29  7:23           ` Christian Borntraeger
2018-03-29  9:09             ` Christian Borntraeger
2018-03-29  9:40               ` Ming Lei
2018-03-29 10:10                 ` Christian Borntraeger
2018-03-29 10:48                   ` Ming Lei
2018-03-29 10:49                     ` Christian Borntraeger
2018-03-29 11:43                       ` Ming Lei
2018-03-29 11:49                         ` Christian Borntraeger
2018-03-30  2:53                           ` Ming Lei
2018-04-04  8:18                             ` Christian Borntraeger
2018-04-05 16:05                               ` Ming Lei
2018-04-05 16:11                                 ` Ming Lei
2018-04-05 17:39                                   ` Christian Borntraeger
2018-04-05 17:43                                     ` Christian Borntraeger
2018-04-06  8:41                                     ` Ming Lei
2018-04-06  8:51                                       ` Christian Borntraeger
2018-04-06  8:53                                         ` Christian Borntraeger
2018-04-06  9:23                                         ` Ming Lei
2018-04-06 10:19                                           ` Christian Borntraeger
2018-04-06 13:41                                             ` Ming Lei
2018-04-06 14:26                                               ` Christian Borntraeger
2018-04-06 14:58                                                 ` Ming Lei
2018-04-06 15:11                                                   ` Christian Borntraeger
2018-04-06 15:40                                                     ` Ming Lei
2018-04-06 11:37                                           ` Christian Borntraeger
2018-04-06  8:35                                 ` Christian Borntraeger
2018-03-29  9:52             ` Ming Lei
2018-03-29 10:11               ` Christian Borntraeger
2018-03-29 10:12                 ` Christian Borntraeger
2018-03-29 10:13               ` Ming Lei

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.