• Josef Bacik's avatar
    blk-iolatency: use q->nr_requests directly · ff4cee08
    Josef Bacik authored
    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: default avatarJosef Bacik <josef@toxicpanda.com>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    ff4cee08
blk-iolatency.c 25 KB