• Paolo Valente's avatar
    block, bfq: do not expire a queue when it is the only busy one · 2391d13e
    Paolo Valente authored
    This commits preserves I/O-dispatch plugging for a special symmetric
    case that may suddenly turn into asymmetric: the case where only one
    bfq_queue, say bfqq, is busy. In this case, not expiring bfqq does not
    cause any harm to any other queues in terms of service guarantees. In
    contrast, it avoids the following unlucky sequence of events: (1) bfqq
    is expired, (2) a new queue with a lower weight than bfqq becomes busy
    (or more queues), (3) the new queue is served until a new request
    arrives for bfqq, (4) when bfqq is finally served, there are so many
    requests of the new queue in the drive that the pending requests for
    bfqq take a lot of time to be served. In particular, event (2) may
    case even already dispatched requests of bfqq to be delayed, inside
    the drive. So, to avoid this series of events, the scenario is
    preventively declared as asymmetric also if bfqq is the only busy
    queues. By doing so, I/O-dispatch plugging is performed for bfqq.
    Tested-by: default avatarJan Kara <jack@suse.cz>
    Signed-off-by: default avatarPaolo Valente <paolo.valente@linaro.org>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    2391d13e
bfq-iosched.c 238 KB