summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2019-06-13 15:30:37 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-07-26 09:11:10 +0200
commitc600458bb020e592ad29bf2449957e0a43f026b2 (patch)
tree2d4248227bc83f64d7ef6e3de5e54c86ca6891a1 /block
parent86ace02c805962af262d03421949c2fa1d7a7fff (diff)
downloadlinux-stable-c600458bb020e592ad29bf2449957e0a43f026b2.tar.gz
linux-stable-c600458bb020e592ad29bf2449957e0a43f026b2.tar.bz2
linux-stable-c600458bb020e592ad29bf2449957e0a43f026b2.zip
blk-iolatency: clear use_delay when io.latency is set to zero
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>
Diffstat (limited to 'block')
-rw-r--r--block/blk-iolatency.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/block/blk-iolatency.c b/block/blk-iolatency.c
index a1eb5e9ac904..d973c38ee4fd 100644
--- a/block/blk-iolatency.c
+++ b/block/blk-iolatency.c
@@ -759,8 +759,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;
}