Files
linux-bredos/drivers
Christoph Hellwig b2c36fa9ac virtio_blk: reverse request order in virtio_queue_rqs
[ Upstream commit 7f212e997e ]

blk_mq_flush_plug_list submits requests in the reverse order that they
were submitted, which leads to a rather suboptimal I/O pattern
especially in rotational devices. Fix this by rewriting virtio_queue_rqs
so that it always pops the requests from the passed in request list, and
then adds them to the head of a local submit list. This actually
simplifies the code a bit as it removes the complicated list splicing,
at the cost of extra updates of the rq_next pointer. As that should be
cache hot anyway it should be an easy price to pay.

Fixes: 0e9911fa76 ("virtio-blk: support mq_ops->queue_rqs()")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20241113152050.157179-3-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-09 10:31:46 +01:00
..
2024-10-17 15:24:14 +02:00
2024-08-19 06:04:28 +02:00
2024-11-08 16:28:26 +01:00
2024-10-04 16:29:14 +02:00