blk-mq: reinsert cached request to the list
PATCH v2 1/1 blk-mq: reinsert cached request to the list
From: Keith Busch <[email protected]>
A previous commit removed an optimization out of caution for a scenario that turns out not to be real: all the "queue_exit" goto's are safe to reinsert the request into the cached_rq's plug list as they are either from a non-blocking path, or a successful merge that already holds the queue reference. This optimization is most needed for small sequential workloads that successfully merge into larger requests.
---v1->v2:
Actually use the correct rq_list function to return the rq to the list.
block/blk-mq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
block/blk-mq.c +1 -1
@@ -3246,7 +3246,7 @@ void blk_mq_submit_bio(struct bio *bio)if (!rq)blk_queue_exit (q);else -blk_mq_free_request (rq); +rq_list_add_head (&plug->cached_rqs, rq); }#ifdef CONFIG_BLK_MQ_STACKING
Signature · 1 line
2.53.0-Meta
Quoted 9 lines · Keith Busch
From: Keith Busch<[email protected]>
A previous commit removed an optimization out of caution for a scenario that turns out not to be real: all the "
queue_exit" goto's are safe to reinsert the request into the cached_rq's plug list as they are either from a non-blocking path, or a successful merge that already holds the queue reference. This optimization is most needed for small sequential workloads that successfully merge into larger requests.
Quoted 4 lines
Fixes dc278e9bf2b9 ("blk-mq: pop cached request if it is usable")Suggested-by Ming Lei<[email protected]>Suggested-by Christoph Hellwig<[email protected]>Signed-off-by Keith Busch<[email protected]>
Looks good.
-ck
Quoted 8 lines · Keith Busch
A previous commit removed an optimization out of caution for a scenario that turns out not to be real: all the "
queue_exit" goto's are safe to reinsert the request into the cached_rq's plug list as they are either from a non-blocking path, or a successful merge that already holds the queue reference. This optimization is most needed for small sequential workloads that successfully merge into larger requests.[...]
Applied, thanks!
[1/1] blk-mq: reinsert cached request to the list
commit: b051bb6bf0a231117036aa607cadf55be8e63910
Best regards,
Signature · 1 line
Jens Axboe
Quoted 28 lines · Keith Busch
From: Keith Busch <[email protected]>
A previous commit removed an optimization out of caution for a scenario that turns out not to be real: all the "
queue_exit" goto's are safe to reinsert the request into the cached_rq's plug list as they are either from a non-blocking path, or a successful merge that already holds the queue reference. This optimization is most needed for small sequential workloads that successfully merge into larger requests.Fixes dc278e9bf2b9 ("blk-mq: pop cached request if it is usable")Suggested-by Ming Lei <[email protected]>Suggested-by Christoph Hellwig <[email protected]>Signed-off-by Keith Busch <[email protected]>---
v1->v2:Actually use the correct
rq_listfunction to return the rq to the list.block/blk-mq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)block/blk-mq.c +0
-0
block/blk-mq.c void blk_mq_submit_bio(struct bio *bio) · line 3250
Quoted 6 lines
block/blk-mq.c +1
-1@@ -3246,7 +3246,7 @@ void blk_mq_submit_bio(struct bio *bio)if (!rq)blk_queue_exit (q);else -blk_mq_free_request (rq); +rq_list_add_head (&plug->cached_rqs, rq); }
Thanks,
Ming Lei