From: Tejun Heo Date: Thu, 13 Jun 2019 22:30:37 +0000 (-0700) Subject: blk-iolatency: clear use_delay when io.latency is set to zero X-Git-Tag: v5.1.20~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bea58a0e6844f244d8d1789f08dab3678483f24c;p=thirdparty%2Fkernel%2Fstable.git 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 Cc: Josef Bacik Fixes: d70675121546 ("block: introduce blk-iolatency io controller") Cc: stable@vger.kernel.org # v4.19+ Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- diff --git a/block/blk-iolatency.c b/block/blk-iolatency.c index 072e1edcf83d1..51070a730e3cd 100644 --- a/block/blk-iolatency.c +++ b/block/blk-iolatency.c @@ -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; }