linux/drivers/nvme/host
Christoph Hellwig 995457cd2a nvme-pci: reverse request order in nvme_queue_rqs
[ Upstream commit beadf00885 ]

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 nvme_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: d62cbcf62f ("nvme: add support for mq_ops->queue_rqs()")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20241113152050.157179-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2024-12-14 19:53:16 +01:00
..
apple.c nvme-apple: only reset the controller when RTKit is running 2023-02-06 08:06:34 +01:00
auth.c nvme-auth: set explanation code for failure2 msgs 2023-12-20 17:00:22 +01:00
constants.c nvme: fix the name of Zone Append for verbose logging 2023-06-09 10:34:04 +02:00
core.c nvme: make keep-alive synchronous operation 2024-11-17 15:07:21 +01:00
fabrics.c nvme: consider also host_iface when checking ip options 2022-09-19 17:55:24 +02:00
fabrics.h nvme: fix reconnection fail due to reserved tag allocation 2024-03-26 18:20:59 -04:00
fault_inject.c block: remove the ->rq_disk field in struct request 2021-11-29 06:41:29 -07:00
fc.c nvme-fc: do not wait in vain when unloading module 2024-03-01 13:26:27 +01:00
fc.h nvme-fc: Update header and host for common definitions for LS handling 2020-05-09 16:18:33 -06:00
hwmon.c nvme-pci: add quirk for missing secondary temperature thresholds 2023-06-09 10:34:09 +02:00
ioctl.c nvme: fix miss command type check 2024-04-10 16:28:35 +02:00
Kconfig nvme-auth: Diffie-Hellman key exchange support 2022-08-02 17:14:49 -06:00
Makefile nvme: don't always build constants.o 2022-08-02 17:22:48 -06:00
multipath.c nvme-multipath: defer partition scanning 2024-11-17 15:07:20 +01:00
nvme.h nvme-multipath: defer partition scanning 2024-11-17 15:07:20 +01:00
pci.c nvme-pci: reverse request order in nvme_queue_rqs 2024-12-14 19:53:16 +01:00
rdma.c nvme-rdma: do not try to stop unallocated queues 2023-10-25 12:03:14 +02:00
tcp.c nvme: tcp: avoid race between queue_lock lock and destroy 2024-11-17 15:07:20 +01:00
trace.c nvme: implement In-Band authentication 2022-08-02 17:14:49 -06:00
trace.h nvme: fix async event trace event 2023-05-11 23:03:22 +09:00
zns.c block: pass a gendisk to blk_queue_max_open_zones and blk_queue_max_active_zones 2022-07-06 06:46:26 -06:00