block, bfq: remove unused bfq_wr_max_time in struct bfq_data
authorKemeng Shi <shikemeng@huaweicloud.com>
Mon, 16 Jan 2023 09:51:53 +0000 (17:51 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 30 Jan 2023 03:03:49 +0000 (20:03 -0700)
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@huaweicloud.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20230116095153.3810101-9-shikemeng@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bfq-iosched.c
block/bfq-iosched.h

index 0416dfe05983c4729e46c4ef419efb198d2bf025..4705c4be90e721316b496101577014fad25a850e 100644 (file)
@@ -1093,9 +1093,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);
 
@@ -7299,7 +7296,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; /*
index 2b4893a68b43fc6ffb720b13d1edc2eff7ab9fc1..75cc6a3242679cf3c67edc5fe45fa2f70eca51be 100644 (file)
@@ -769,8 +769,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;