Skip to content

Commit

Permalink
block: avoid setting wbt_lat_usec to current value
Browse files Browse the repository at this point in the history
There's no reason to set wbt min lat and freeze request queue
if current value is the same.

Reviewed-by: Johannes Thumshirn <[email protected]>
Signed-off-by: Aleksei Zakharov <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
AlexZzz authored and axboe committed Feb 11, 2019
1 parent 0586942 commit b7143fe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions block/blk-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,9 @@ static ssize_t queue_wb_lat_store(struct request_queue *q, const char *page,
else if (val >= 0)
val *= 1000ULL;

if (wbt_get_min_lat(q) == val)
return count;

/*
* Ensure that the queue is idled, in case the latency update
* ends up either enabling or disabling wbt completely. We can't
Expand Down

0 comments on commit b7143fe

Please sign in to comment.