• Paolo Valente's avatar
    block, bfq: do not expire a queue that will deserve dispatch plugging · 4420b095
    Paolo Valente authored
    For some bfq_queues, BFQ plugs I/O dispatching when the queue becomes
    idle, and keeps the plug until a new request of the queue arrives, or
    a timeout fires. BFQ does so either to boost throughput or to preserve
    service guarantees for the queue.
    
    More precisely, for such a queue, plugging starts when the queue
    happens to have either no request enqueued, or no request in flight,
    that is, no request already dispatched but not yet completed.
    
    On the opposite end, BFQ may happen to expire a queue with no request
    enqueued, without doing any plugging, if the queue still has some
    request in flight. Unfortunately, such a premature expiration causes
    the queue to lose its chance to enjoy dispatch plugging a moment
    later, i.e., when its in-flight requests finally get completed. This
    breaks service guarantees for the queue.
    
    This commit prevents BFQ from expiring an empty queue if the latter
    still has in-flight requests.
    Tested-by: default avatarHolger Hoffstätte <holger@applied-asynchrony.com>
    Tested-by: default avatarOleksandr Natalenko <oleksandr@natalenko.name>
    Signed-off-by: default avatarPaolo Valente <paolo.valente@linaro.org>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    4420b095
bfq-iosched.c 186 KB