Skip to content

Commit

Permalink
blk-iolatency: clear use_delay when io.latency is set to zero
Browse files Browse the repository at this point in the history
commit 5de0073 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: d706751 ("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>
  • Loading branch information
Tejun Heo authored and Greg Kroah-Hartman committed Jul 26, 2019
1 parent 86ace02 commit c600458
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion block/blk-iolatency.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit c600458

Please sign in to comment.