diff options
author | Bart Van Assche <bart.vanassche@wdc.com> | 2018-01-10 11:33:33 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-01-10 11:45:29 -0500 |
commit | fcd36c36f381f534adad5a6c6485db4405d5ea42 (patch) | |
tree | 1f97dc35dc4382215a15a5112fc559b1b5dd7f2d /block/blk-mq.c | |
parent | 5f15684bd5e5ef39d4337988864fec8012471dda (diff) |
blk-mq: Explain when 'active_queues' is decremented
It is nontrivial to derive from the blk-mq source code when
blk_mq_tags.active_queues is decremented. Hence add a comment that
explains this.
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r-- | block/blk-mq.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index 9aa24c9508f9..266fc4f6b046 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c | |||
@@ -954,6 +954,12 @@ static void blk_mq_timeout_work(struct work_struct *work) | |||
954 | data.next = blk_rq_timeout(round_jiffies_up(data.next)); | 954 | data.next = blk_rq_timeout(round_jiffies_up(data.next)); |
955 | mod_timer(&q->timeout, data.next); | 955 | mod_timer(&q->timeout, data.next); |
956 | } else { | 956 | } else { |
957 | /* | ||
958 | * Request timeouts are handled as a forward rolling timer. If | ||
959 | * we end up here it means that no requests are pending and | ||
960 | * also that no request has been pending for a while. Mark | ||
961 | * each hctx as idle. | ||
962 | */ | ||
957 | queue_for_each_hw_ctx(q, hctx, i) { | 963 | queue_for_each_hw_ctx(q, hctx, i) { |
958 | /* the hctx may be unmapped, so check it here */ | 964 | /* the hctx may be unmapped, so check it here */ |
959 | if (blk_mq_hw_queue_mapped(hctx)) | 965 | if (blk_mq_hw_queue_mapped(hctx)) |