]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
blk-iolatency: clear use_delay when io.latency is set to zero
authorTejun Heo <tj@kernel.org>
Thu, 13 Jun 2019 22:30:37 +0000 (15:30 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jul 2019 07:13:07 +0000 (09:13 +0200)
commit 5de0073fcd50cc1f150895a7bb04d3cf8067b1d7 upstream.

If use_delay was non-zero when the latency target of a cgroup was set
to zero, it will stay stuck until io.latency is enabled on the cgroup
again.  This keeps readahead disabled for the cgroup impacting
performance negatively.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Josef Bacik <jbacik@fb.com>
Fixes: d70675121546 ("block: introduce blk-iolatency io controller")
Cc: stable@vger.kernel.org # v4.19+
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
block/blk-iolatency.c

index 072e1edcf83d104f86500bacaf36a0161856ca72..51070a730e3cd4adbf2087825823bc426ff5ff11 100644 (file)
@@ -758,8 +758,10 @@ static int iolatency_set_min_lat_nsec(struct blkcg_gq *blkg, u64 val)
 
        if (!oldval && val)
                return 1;
-       if (oldval && !val)
+       if (oldval && !val) {
+               blkcg_clear_delay(blkg);
                return -1;
+       }
        return 0;
 }