summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorLiu Bo <bo.liu@linux.alibaba.com>2018-06-29 09:56:56 +0800
committerJens Axboe <axboe@kernel.dk>2018-07-09 09:07:52 -0600
commit43ada78781246cb36036f26158a645c17550ac54 (patch)
treead75c7e5855b6f756c8ff84b0ac71d6fbd4f6438 /block
parente1a413245a564683697a3d02ec197b72cf009b89 (diff)
downloadlinux-43ada78781246cb36036f26158a645c17550ac54.tar.gz
linux-43ada78781246cb36036f26158a645c17550ac54.tar.bz2
linux-43ada78781246cb36036f26158a645c17550ac54.zip
Block: blk-throttle: set low_valid immediately once one cgroup has io.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>
Diffstat (limited to 'block')
-rw-r--r--block/blk-throttle.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index 82282e6fdcf8..63bb261811dd 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -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();