Commit 4247d9c8 authored by Baolin Wang's avatar Baolin Wang Committed by Jens Axboe

blk-throttle: Remove a meaningless parameter for throtl_downgrade_state()

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: default avatarBaolin Wang <baolin.wang@linux.alibaba.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent fa1c3eaf
...@@ -1970,7 +1970,7 @@ static void throtl_upgrade_state(struct throtl_data *td) ...@@ -1970,7 +1970,7 @@ static void throtl_upgrade_state(struct throtl_data *td)
queue_work(kthrotld_workqueue, &td->dispatch_work); 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; td->scale /= 2;
...@@ -1980,7 +1980,7 @@ static void throtl_downgrade_state(struct throtl_data *td, int new) ...@@ -1980,7 +1980,7 @@ static void throtl_downgrade_state(struct throtl_data *td, int new)
return; return;
} }
td->limit_index = new; td->limit_index = LIMIT_LOW;
td->low_downgrade_time = jiffies; td->low_downgrade_time = jiffies;
} }
...@@ -2067,7 +2067,7 @@ static void throtl_downgrade_check(struct throtl_grp *tg) ...@@ -2067,7 +2067,7 @@ static void throtl_downgrade_check(struct throtl_grp *tg)
* cgroups * cgroups
*/ */
if (throtl_hierarchy_can_downgrade(tg)) 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[READ] = 0;
tg->last_bytes_disp[WRITE] = 0; tg->last_bytes_disp[WRITE] = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment