lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 19 Jun 2018 15:18:05 +0000
From:   Bart Van Assche <Bart.VanAssche@....com>
To:     "jianchao.w.wang@...cle.com" <jianchao.w.wang@...cle.com>,
        "axboe@...nel.dk" <axboe@...nel.dk>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-block@...r.kernel.org" <linux-block@...r.kernel.org>
Subject: Re: [PATCH] blk-mq: use blk_mq_timeout_work to limit the max timeout

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@...cle.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.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ