Skip to content

Commit

Permalink
Block: blk-throttle: set low_valid immediately once one cgroup has io…
Browse files Browse the repository at this point in the history
….low configured

Once one cgroup has io.low configured, @low_valid becomes true and other
cgroups won't switch it back whatsoever.

Signed-off-by: Liu Bo <bo.liu@linux.alibaba.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Liu Bo authored and Jens Axboe committed Jul 9, 2018
1 parent e1a4132 commit 43ada78
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion block/blk-throttle.c
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,10 @@ static void blk_throtl_update_limit_valid(struct throtl_data *td)
struct throtl_grp *tg = blkg_to_tg(blkg);

if (tg->bps[READ][LIMIT_LOW] || tg->bps[WRITE][LIMIT_LOW] ||
tg->iops[READ][LIMIT_LOW] || tg->iops[WRITE][LIMIT_LOW])
tg->iops[READ][LIMIT_LOW] || tg->iops[WRITE][LIMIT_LOW]) {
low_valid = true;
break;
}
}
rcu_read_unlock();

Expand Down

0 comments on commit 43ada78

Please sign in to comment.