Skip to content

Commit 00e8d29

Browse files
Christoph Hellwigaxboe
authored andcommitted
block: don't reorder requests in blk_mq_add_to_batch
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>
1 parent e70c301 commit 00e8d29

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

include/linux/blk-mq.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,7 @@ static inline bool blk_mq_add_to_batch(struct request *req,
884884
else if (iob->complete != complete)
885885
return false;
886886
iob->need_ts |= blk_mq_need_time_stamp(req);
887-
rq_list_add_head(&iob->req_list, req);
887+
rq_list_add_tail(&iob->req_list, req);
888888
return true;
889889
}
890890

0 commit comments

Comments
 (0)