]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
blk-iolatency: use q->nr_requests directly
authorJosef Bacik <josef@toxicpanda.com>
Fri, 28 Sep 2018 17:45:39 +0000 (13:45 -0400)
committerJens Axboe <axboe@kernel.dk>
Fri, 28 Sep 2018 17:47:27 +0000 (11:47 -0600)
commitff4cee0898756f07f8b50b30ea00efc773de24e6
tree0dc060c58f8cba542a16b007647d09adde272d7b
parentf0a0cdddb14c7a32e7ca68f45fbc44aa347e959d
blk-iolatency: use q->nr_requests directly

We were using blk_queue_depth() assuming that it would return
nr_requests, but we hit a case in production on drives that had to have
NCQ turned off in order for them to not shit the bed which resulted in a
qd of 1, even though the nr_requests was much larger.  iolatency really
only cares about requests we are allowed to queue up, as any io that
get's onto the request list is going to be serviced soonish, so we want
to be throttling before the bio gets onto the request list.  To make
iolatency work as expected, simply use q->nr_requests instead of
blk_queue_depth() as that is what we actually care about.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-iolatency.c