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
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 <[email protected]>
Cc: Josef Bacik <[email protected]>
Fixes: d706751 ("block: introduce blk-iolatency io controller")
Cc: [email protected] # v4.19+
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
htejun authored and axboe committed Jun 15, 2019
1 parent f1f8f29 commit 5de0073
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 @@ -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;
}

Expand Down

0 comments on commit 5de0073

Please sign in to comment.