* [PATCH V2] blk-mq: put driver tag if dispatch budget can't be got
@ 2017-11-08 1:11 Ming Lei
2017-11-08 18:19 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Ming Lei @ 2017-11-08 1:11 UTC (permalink / raw)
To: Jens Axboe, linux-block, Christoph Hellwig
Cc: Omar Sandoval, Bart Van Assche, Hannes Reinecke, Ming Lei
We have to put the driver tag if dispatch budget can't be got, otherwise
it might cause IO deadlock, especially in case that size of tags is very
small.
Fixes: de1482974080(blk-mq: introduce .get_budget and .put_budget in blk_mq_ops)
Signed-off-by: Ming Lei <ming.lei@redhat.com>
---
V2:
add Fixes tag
block/blk-mq.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index c501cbd0de93..3d759bb8a5bb 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1080,8 +1080,10 @@ bool blk_mq_dispatch_rq_list(struct request_queue *q, struct list_head *list,
}
}
- if (!got_budget && !blk_mq_get_dispatch_budget(hctx))
+ if (!got_budget && !blk_mq_get_dispatch_budget(hctx)) {
+ blk_mq_put_driver_tag(rq);
break;
+ }
list_del_init(&rq->queuelist);
--
2.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH V2] blk-mq: put driver tag if dispatch budget can't be got
2017-11-08 1:11 [PATCH V2] blk-mq: put driver tag if dispatch budget can't be got Ming Lei
@ 2017-11-08 18:19 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2017-11-08 18:19 UTC (permalink / raw)
To: Ming Lei, linux-block, Christoph Hellwig
Cc: Omar Sandoval, Bart Van Assche, Hannes Reinecke
On 11/07/2017 06:11 PM, Ming Lei wrote:
> We have to put the driver tag if dispatch budget can't be got, otherwise
> it might cause IO deadlock, especially in case that size of tags is very
> small.
Applied, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-08 18:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-08 1:11 [PATCH V2] blk-mq: put driver tag if dispatch budget can't be got Ming Lei
2017-11-08 18:19 ` Jens Axboe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.