diff options
author | Tejun Heo <tj@kernel.org> | 2019-06-13 18:30:37 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-06-15 12:39:36 -0400 |
commit | 5de0073fcd50cc1f150895a7bb04d3cf8067b1d7 (patch) | |
tree | 6bb69d881d5f4ece07693f4b8dae2dbeccad4c2d /block | |
parent | f1f8f292cd12292289cae87aac3a5c035186ec54 (diff) |
blk-iolatency: clear use_delay when io.latency is set to zero
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>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-iolatency.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/block/blk-iolatency.c b/block/blk-iolatency.c index d22e61bced86..17896bb3aaf2 100644 --- a/block/blk-iolatency.c +++ b/block/blk-iolatency.c | |||
@@ -778,8 +778,10 @@ static int iolatency_set_min_lat_nsec(struct blkcg_gq *blkg, u64 val) | |||
778 | 778 | ||
779 | if (!oldval && val) | 779 | if (!oldval && val) |
780 | return 1; | 780 | return 1; |
781 | if (oldval && !val) | 781 | if (oldval && !val) { |
782 | blkcg_clear_delay(blkg); | ||
782 | return -1; | 783 | return -1; |
784 | } | ||
783 | return 0; | 785 | return 0; |
784 | } | 786 | } |
785 | 787 | ||