Skip to content

Commit

Permalink
blk-throttle: Remove a meaningless parameter for throtl_downgrade_sta…
Browse files Browse the repository at this point in the history
…te()

The throtl_downgrade_state() is always used to change to LIMIT_LOW
limitation, thus remove the latter meaningless parameter which
indicates the limitation index.

Signed-off-by: Baolin Wang <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Baolin Wang authored and axboe committed Oct 8, 2020
1 parent fa1c3ea commit 4247d9c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions block/blk-throttle.c
Original file line number Diff line number Diff line change
Expand Up @@ -1970,7 +1970,7 @@ static void throtl_upgrade_state(struct throtl_data *td)
queue_work(kthrotld_workqueue, &td->dispatch_work);
}

static void throtl_downgrade_state(struct throtl_data *td, int new)
static void throtl_downgrade_state(struct throtl_data *td)
{
td->scale /= 2;

Expand All @@ -1980,7 +1980,7 @@ static void throtl_downgrade_state(struct throtl_data *td, int new)
return;
}

td->limit_index = new;
td->limit_index = LIMIT_LOW;
td->low_downgrade_time = jiffies;
}

Expand Down Expand Up @@ -2067,7 +2067,7 @@ static void throtl_downgrade_check(struct throtl_grp *tg)
* cgroups
*/
if (throtl_hierarchy_can_downgrade(tg))
throtl_downgrade_state(tg->td, LIMIT_LOW);
throtl_downgrade_state(tg->td);

tg->last_bytes_disp[READ] = 0;
tg->last_bytes_disp[WRITE] = 0;
Expand Down

0 comments on commit 4247d9c

Please sign in to comment.