From: Bart Van Assche <Bart.VanAssche@wdc.com>
To: "jianchao.w.wang@oracle.com" <jianchao.w.wang@oracle.com>,
"axboe@kernel.dk" <axboe@kernel.dk>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: Re: [PATCH] blk-mq: use blk_mq_timeout_work to limit the max timeout
Date: Tue, 19 Jun 2018 15:18:05 +0000 [thread overview]
Message-ID: <884a5cbb5622ca5c890585a8d5dff0e3a1d60cfe.camel@wdc.com> (raw)
In-Reply-To: <1529391610-1654-1-git-send-email-jianchao.w.wang@oracle.com>
On Tue, 2018-06-19 at 15:00 +0800, Jianchao Wang wrote:
> 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
Hello Jianchao,
What makes you think that it would be necessary to call blk_rq_timeout() from
blk_mq_timeout_work()? Have you noticed that blk_add_timer() already calls that
function? I think it is not necessary to call blk_rq_timeout() from
blk_mq_timeout_work() because it is guaranteed in that function that the next
timeout is less than BLK_MAX_TIMEOUT jiffies in the future.
Bart.
next prev parent reply other threads:[~2018-06-19 15:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-19 7:00 Jianchao Wang
2018-06-19 15:18 ` Bart Van Assche [this message]
2018-06-20 1:28 ` jianchao.wang
2018-06-20 1:35 ` Bart Van Assche
2018-06-20 1:37 ` jianchao.wang
2018-06-20 1:45 ` jianchao.wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=884a5cbb5622ca5c890585a8d5dff0e3a1d60cfe.camel@wdc.com \
--to=bart.vanassche@wdc.com \
--cc=axboe@kernel.dk \
--cc=jianchao.w.wang@oracle.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®