[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250512052025.293031-1-xue01.he@samsung.com>
Date: Mon, 12 May 2025 13:20:25 +0800
From: hexue <xue01.he@...sung.com>
To: axboe@...nel.dk, asml.silence@...il.com, io-uring@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: hexue <xue01.he@...sung.com>
Subject: [PATCH] io_uring/uring_cmd: fix hybrid polling initialization issue
Modify the defect that the timer is not initialized during IO transfer
when passthrough is used with hybrid polling to ensure that the program
can run normally.
Fixes: 01ee194d1aba ("io_uring: add support for hybrid IOPOLL")
Signed-off-by: hexue <xue01.he@...sung.com>
---
io_uring/uring_cmd.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/io_uring/uring_cmd.c b/io_uring/uring_cmd.c
index a9ea7d29cdd9..430ed620ddfe 100644
--- a/io_uring/uring_cmd.c
+++ b/io_uring/uring_cmd.c
@@ -254,6 +254,11 @@ int io_uring_cmd(struct io_kiocb *req, unsigned int issue_flags)
return -EOPNOTSUPP;
issue_flags |= IO_URING_F_IOPOLL;
req->iopoll_completed = 0;
+ if (ctx->flags & IORING_SETUP_HYBRID_IOPOLL) {
+ /* make sure every req only blocks once */
+ req->flags &= ~REQ_F_IOPOLL_STATE;
+ req->iopoll_start = ktime_get_ns();
+ }
}
ret = file->f_op->uring_cmd(ioucmd, issue_flags);
--
2.43.0
Powered by blists - more mailing lists