1
0
Fork 0

block: avoid setting wbt_lat_usec to current value

There's no reason to set wbt min lat and freeze request queue
if current value is the same.

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Aleksei Zakharov <zakharov.a.g@yandex.ru>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
hifive-unleashed-5.1
Aleksei Zakharov 2019-02-11 13:10:34 +03:00 committed by Jens Axboe
parent 0586942f03
commit b7143fe67b
1 changed files with 3 additions and 0 deletions

View File

@ -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