提交 080ff351 编写于 作者: J Jens Axboe

blk-mq: re-check for available tags after running the hardware queue

If we run out of tags and have to sleep, we run the hardware queue
to kick pending IO into gear. During that run, we may have completed
requests, so re-check if we have free tags before going to sleep.
Signed-off-by: NJens Axboe <axboe@fb.com>
上级 b3223207
......@@ -261,6 +261,14 @@ static int bt_get(struct blk_mq_alloc_data *data,
*/
blk_mq_run_hw_queue(hctx, false);
/*
* Retry tag allocation after running the hardware queue,
* as running the queue may also have found completions.
*/
tag = __bt_get(hctx, bt, last_tag);
if (tag != -1)
break;
blk_mq_put_ctx(data->ctx);
io_schedule();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册