Hi Jens,
I've a question about poll_multi_file in io_do_iopoll().
It keeps spinning in f_op->iopoll() if poll_multi_file is
true (and we're under the requested amount). But in my
understanding, reqs may be in different hardware queues
for blk-mq device even in this situation.
Should we consider the hardware queue number as well? Some
thing like below:
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 7b0e6bc9ea3d..479a75022449 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -2533,10 +2533,13 @@ static void io_iopoll_req_issued(struct io_kiocb
*req, bool in_async)
ctx->poll_multi_file = false;
} else if (!ctx->poll_multi_file) {
struct io_kiocb *list_req;
+ unsigned int queue_num0, queue_num1;
list_req = list_first_entry(&ctx->iopoll_list, struct
io_kiocb,
inflight_entry);
- if (list_req->file != req->file)
+ queue_num0 =
blk_qc_t_to_queue_num(list_req->rw.kiocb.ki_cookie);
+ queue_num1 = blk_qc_t_to_queue_num(req->rw.kiocb.ki_cookie);
+ if (list_req->file != req->file || queue_num0 != queue_num1)
ctx->poll_multi_file = true;
}