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]
Message-ID: <YoKmCOAzwzw3Lz7g@slm.duckdns.org>
Date:   Mon, 16 May 2022 09:29:12 -1000
From:   Tejun Heo <tj@...nel.org>
To:     Zhang Wensheng <zhangwensheng5@...wei.com>
Cc:     axboe@...nel.dk, linux-block@...r.kernel.org,
        linux-kernel@...r.kernel.org, cgroups@...r.kernel.org,
        yukuai3@...wei.com
Subject: Re: [PATCH -next] block: fix io hung of setting throttle limit
 frequently

On Mon, May 16, 2022 at 09:44:29AM +0800, Zhang Wensheng wrote:
> diff --git a/block/blk-throttle.c b/block/blk-throttle.c
> index 469c483719be..8acb205dfa85 100644
> --- a/block/blk-throttle.c
> +++ b/block/blk-throttle.c
> @@ -1321,12 +1321,14 @@ static void tg_conf_updated(struct throtl_grp *tg, bool global)
>  	 * that a group's limit are dropped suddenly and we don't want to
>  	 * account recently dispatched IO with new low rate.
>  	 */
> -	throtl_start_new_slice(tg, READ);
> -	throtl_start_new_slice(tg, WRITE);
> +	if (!timer_pending(&sq->parent_sq->pending_timer)) {
> +		throtl_start_new_slice(tg, READ);
> +		throtl_start_new_slice(tg, WRITE);
>  
> -	if (tg->flags & THROTL_TG_PENDING) {
> -		tg_update_disptime(tg);
> -		throtl_schedule_next_dispatch(sq->parent_sq, true);
> +		if (tg->flags & THROTL_TG_PENDING) {
> +			tg_update_disptime(tg);
> +			throtl_schedule_next_dispatch(sq->parent_sq, true);
> +		}

Yeah, but this ends up breaking the reason why it's starting the new slices
in the first place explained in the commit above, right? I'm not sure what
the right solution is but this likely isn't it.

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ