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: <20230102160024.s77ugy425npqgz53@quack3>
Date:   Mon, 2 Jan 2023 17:00:24 +0100
From:   Jan Kara <jack@...e.cz>
To:     Kemeng Shi <shikemeng@...weicloud.com>
Cc:     paolo.valente@...aro.org, axboe@...nel.dk,
        linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
        jack@...e.cz, hch@....de, damien.lemoal@....com
Subject: Re: [PATCH RESEND v2 09/10] block, bfq: remove unused
 bfq_wr_max_time in struct bfq_data

On Fri 23-12-22 03:16:40, Kemeng Shi wrote:
> bfqd->bfq_wr_max_time is set to 0 in bfq_init_queue and is never changed.
> It is only used in bfq_wr_duration when bfq_wr_max_time > 0 which never
> meets, so bfqd->bfq_wr_max_time is not used actually. Just remove it.
> 
> Signed-off-by: Kemeng Shi <shikemeng@...weicloud.com>

Nice catch. Feel free to add:

Reviewed-by: Jan Kara <jack@...e.cz>

								Honza

> ---
>  block/bfq-iosched.c | 4 ----
>  block/bfq-iosched.h | 2 --
>  2 files changed, 6 deletions(-)
> 
> diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
> index 195cdc6be087..91bc68fba72d 100644
> --- a/block/bfq-iosched.c
> +++ b/block/bfq-iosched.c
> @@ -1068,9 +1068,6 @@ static unsigned int bfq_wr_duration(struct bfq_data *bfqd)
>  {
>  	u64 dur;
>  
> -	if (bfqd->bfq_wr_max_time > 0)
> -		return bfqd->bfq_wr_max_time;
> -
>  	dur = bfqd->rate_dur_prod;
>  	do_div(dur, bfqd->peak_rate);
>  
> @@ -7079,7 +7076,6 @@ static int bfq_init_queue(struct request_queue *q, struct elevator_type *e)
>  	 */
>  	bfqd->bfq_wr_coeff = 30;
>  	bfqd->bfq_wr_rt_max_time = msecs_to_jiffies(300);
> -	bfqd->bfq_wr_max_time = 0;
>  	bfqd->bfq_wr_min_idle_time = msecs_to_jiffies(2000);
>  	bfqd->bfq_wr_min_inter_arr_async = msecs_to_jiffies(500);
>  	bfqd->bfq_wr_max_softrt_rate = 7000; /*
> diff --git a/block/bfq-iosched.h b/block/bfq-iosched.h
> index 9fa89577322d..0b1a5438046a 100644
> --- a/block/bfq-iosched.h
> +++ b/block/bfq-iosched.h
> @@ -719,8 +719,6 @@ struct bfq_data {
>  	 * is multiplied.
>  	 */
>  	unsigned int bfq_wr_coeff;
> -	/* maximum duration of a weight-raising period (jiffies) */
> -	unsigned int bfq_wr_max_time;
>  
>  	/* Maximum weight-raising duration for soft real-time processes */
>  	unsigned int bfq_wr_rt_max_time;
> -- 
> 2.30.0
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ