diff options
| author | Christoph Hellwig <hch@lst.de> | 2024-11-13 16:20:45 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-04-25 10:48:06 +0200 |
| commit | 7e2d22493939e10d9e9c052ae46088001d42ae3d (patch) | |
| tree | 4dc1cbae03bfc7c345ad3290bc98f728dfcca6f9 /block | |
| parent | 2ad0f19a4e9955703ac5c4e945f0bcdba0098794 (diff) | |
| download | linux-7e2d22493939e10d9e9c052ae46088001d42ae3d.tar.gz linux-7e2d22493939e10d9e9c052ae46088001d42ae3d.tar.bz2 linux-7e2d22493939e10d9e9c052ae46088001d42ae3d.zip | |
block: don't reorder requests in blk_add_rq_to_plug
commit e70c301faece15b618e54b613b1fd6ece3dd05b4 upstream.
Add requests to the tail of the list instead of the front so that they
are queued up in submission order.
Remove the re-reordering in blk_mq_dispatch_plug_list, virtio_queue_rqs
and nvme_queue_rqs now that the list is ordered as expected.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20241113152050.157179-6-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'block')
| -rw-r--r-- | block/blk-mq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index c7fb3722d620..f26bee562693 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1386,7 +1386,7 @@ static void blk_add_rq_to_plug(struct blk_plug *plug, struct request *rq) */ if (!plug->has_elevator && (rq->rq_flags & RQF_SCHED_TAGS)) plug->has_elevator = true; - rq_list_add_head(&plug->mq_list, rq); + rq_list_add_tail(&plug->mq_list, rq); plug->rq_count++; } @@ -2840,7 +2840,7 @@ static void blk_mq_dispatch_plug_list(struct blk_plug *plug, bool from_sched) rq_list_add_tail(&requeue_list, rq); continue; } - list_add(&rq->queuelist, &list); + list_add_tail(&rq->queuelist, &list); depth++; } while (!rq_list_empty(&plug->mq_list)); |
