linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESENT] blk-mq: use blk_rq_timeout to limit the max timeout
@ 2018-06-19  7:03 Jianchao Wang
  0 siblings, 0 replies; only message in thread
From: Jianchao Wang @ 2018-06-19  7:03 UTC (permalink / raw)
  To: axboe; +Cc: linux-block, linux-kernel

blk_rq_timeout is needed to limit the max timeout value, otherwise,
a idle hctx cannot be deactivated timely in shared-tag case.

Fixes: 12f5b931 (blk-mq: Remove generation seqeunce)
Signed-off-by: Jianchao Wang <jianchao.w.wang@oracle.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 70c65bb..ccebe7b 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -868,7 +868,7 @@ static void blk_mq_timeout_work(struct work_struct *work)
 	blk_mq_queue_tag_busy_iter(q, blk_mq_check_expired, &next);
 
 	if (next != 0) {
-		mod_timer(&q->timeout, next);
+		mod_timer(&q->timeout, blk_rq_timeout(round_jiffies_up(next)));
 	} else {
 		/*
 		 * Request timeouts are handled as a forward rolling timer. If
-- 
2.7.4

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-06-19  7:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-19  7:03 [PATCH RESENT] blk-mq: use blk_rq_timeout to limit the max timeout Jianchao Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).