]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
block: don't reorder requests in blk_mq_add_to_batch
authorChristoph Hellwig <hch@lst.de>
Wed, 13 Nov 2024 15:20:46 +0000 (16:20 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 13 Nov 2024 19:04:58 +0000 (12:04 -0700)
LIFO ordering for batched completions is a bit unexpected and also
defeats some merging optimizations in e.g. the XFS buffered write
code.  Now that we can easily add the request to the tail of the list
do that.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20241113152050.157179-7-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/blk-mq.h

index c61e043656775ca132a0c47e6e758a07dc88b514..c596e0e4cb751ab00f2150cf086fcdc5ad32b02e 100644 (file)
@@ -884,7 +884,7 @@ static inline bool blk_mq_add_to_batch(struct request *req,
        else if (iob->complete != complete)
                return false;
        iob->need_ts |= blk_mq_need_time_stamp(req);
-       rq_list_add_head(&iob->req_list, req);
+       rq_list_add_tail(&iob->req_list, req);
        return true;
 }