diff options
author | Josef Bacik <josef@toxicpanda.com> | 2018-09-28 19:45:40 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-09-28 19:47:28 +0200 |
commit | 9f60511a021e677c43b3e2d1a890e3d0d372e394 (patch) | |
tree | 357db225648674eaf5fa5467e2fe9f6367564013 /block | |
parent | blk-iolatency: use q->nr_requests directly (diff) | |
download | linux-9f60511a021e677c43b3e2d1a890e3d0d372e394.tar.xz linux-9f60511a021e677c43b3e2d1a890e3d0d372e394.zip |
blk-iolatency: deal with nr_requests == 1
Hitting the case where blk_queue_depth() returned 1 uncovered the fact
that iolatency doesn't actually handle this case properly, it simply
doesn't scale down anybody. For this case we should go straight into
applying the time delay, which we weren't doing. Since we already limit
the floor at 1 request this if statement is not needed, and this allows
us to set our depth to 1 which allows us to apply the delay if needed.
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-iolatency.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-iolatency.c b/block/blk-iolatency.c index c2e38bc12f27..8daea7a4fe49 100644 --- a/block/blk-iolatency.c +++ b/block/blk-iolatency.c @@ -312,7 +312,7 @@ static void scale_change(struct iolatency_grp *iolat, bool up) iolat->rq_depth.max_depth = old; wake_up_all(&iolat->rq_wait.wait); } - } else if (old > 1) { + } else { old >>= 1; iolat->rq_depth.max_depth = max(old, 1UL); } |