block/mq-deadline: Reserve 25% of scheduler tags for synchronous requests
authorBart Van Assche <bvanassche@acm.org>
Fri, 18 Jun 2021 00:44:51 +0000 (17:44 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 21 Jun 2021 21:03:40 +0000 (15:03 -0600)
commit07757588e5076748308dd95ee2e3cd0b82ebb8c4
tree57b729597e4e39e08f5b14c7e96bae905eff3b34
parentd6d7f013d65491eaff477b9bd83b80111f5be9e4
block/mq-deadline: Reserve 25% of scheduler tags for synchronous requests

For interactive workloads it is important that synchronous requests are
not delayed. Hence reserve 25% of scheduler tags for synchronous requests.
This patch still allows asynchronous requests to fill the hardware queues
since blk_mq_init_sched() makes sure that the number of scheduler requests
is the double of the hardware queue depth. From blk_mq_init_sched():

q->nr_requests = 2 * min_t(unsigned int, q->tag_set->queue_depth,
   BLKDEV_MAX_RQ);

Cc: Damien Le Moal <damien.lemoal@wdc.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Cc: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20210618004456.7280-12-bvanassche@acm.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/mq-deadline.c