Block: blk-throttle: set low_valid immediately once one cgroup has io.low configured
authorLiu Bo <bo.liu@linux.alibaba.com>
Fri, 29 Jun 2018 01:56:56 +0000 (09:56 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 9 Jul 2018 15:07:52 +0000 (09:07 -0600)
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>
block/blk-throttle.c

index 82282e6fdcf82cb1b662c1eac468e8de71d6826d..63bb261811dd0a4c4a468b4f7e706b63e8362110 100644 (file)
@@ -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();