Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5de0073f authored by Tejun Heo's avatar Tejun Heo Committed by Jens Axboe
Browse files

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: default avatarTejun Heo <tj@kernel.org>
Cc: Josef Bacik <jbacik@fb.com>
Fixes: d7067512 ("block: introduce blk-iolatency io controller")
Cc: stable@vger.kernel.org # v4.19+
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent f1f8f292
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -778,8 +778,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;
}