Skip to content

Commit

Permalink
blk-throttle: remove last_low_overflow_time
Browse files Browse the repository at this point in the history
last_low_overflow_time is not used anymore after commit bf20ab5
("blk-throttle: remove CONFIG_BLK_DEV_THROTTLING_LOW").

Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Acked-by: Tejun Heo <tj@kernel.org>
Link: https://lore.kernel.org/r/20240903135149.271857-2-yukuai1@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
YuKuai-huawei authored and axboe committed Sep 10, 2024
1 parent a5e61b5 commit 3bf73e6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
8 changes: 1 addition & 7 deletions block/blk-throttle.c
Original file line number Diff line number Diff line change
Expand Up @@ -1611,17 +1611,13 @@ bool __blk_throtl_bio(struct bio *bio)
sq = &tg->service_queue;

while (true) {
if (tg->last_low_overflow_time[rw] == 0)
tg->last_low_overflow_time[rw] = jiffies;
/* throtl is FIFO - if bios are already queued, should queue */
if (sq->nr_queued[rw])
break;

/* if above limits, break to queue */
if (!tg_may_dispatch(tg, bio, NULL)) {
tg->last_low_overflow_time[rw] = jiffies;
if (!tg_may_dispatch(tg, bio, NULL))
break;
}

/* within limits, let's charge and dispatch directly */
throtl_charge_bio(tg, bio);
Expand Down Expand Up @@ -1661,8 +1657,6 @@ bool __blk_throtl_bio(struct bio *bio)
tg->io_disp[rw], tg_iops_limit(tg, rw),
sq->nr_queued[READ], sq->nr_queued[WRITE]);

tg->last_low_overflow_time[rw] = jiffies;

td->nr_queued[rw]++;
throtl_add_bio_tg(bio, qn, tg);
throttled = true;
Expand Down
2 changes: 0 additions & 2 deletions block/blk-throttle.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ struct throtl_grp {
/* Number of bio's dispatched in current slice */
unsigned int io_disp[2];

unsigned long last_low_overflow_time[2];

uint64_t last_bytes_disp[2];
unsigned int last_io_disp[2];

Expand Down

0 comments on commit 3bf73e6

Please sign in to comment.