Skip to content

Commit b7143fe

Browse files
AlexZzzaxboe
authored andcommitted
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>
1 parent 0586942 commit b7143fe

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎block/blk-sysfs.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,9 @@ static ssize_t queue_wb_lat_store(struct request_queue *q, const char *page,
468468
else if (val >= 0)
469469
val *= 1000ULL;
470470

471+
if (wbt_get_min_lat(q) == val)
472+
return count;
473+
471474
/*
472475
* Ensure that the queue is idled, in case the latency update
473476
* ends up either enabling or disabling wbt completely. We can't

0 commit comments

Comments
 (0)