public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix Hybrid Polling initialization issue
       [not found] <CGME20250508021828epcas5p21b9313ec7c9e0da2e7e49db36854aa22@epcas5p2.samsung.com>
@ 2025-05-08  2:18 ` hexue
  2025-05-08 15:05   ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: hexue @ 2025-05-08  2:18 UTC (permalink / raw)
  To: axboe, asml.silence, io-uring, linux-kernel; +Cc: peiwei.li, hexue

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.

Signed-off-by: hexue <xue01.he@samsung.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 e6701b7aa147..678a2f7d14ff 100644
--- a/io_uring/uring_cmd.c
+++ b/io_uring/uring_cmd.c
@@ -244,6 +244,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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix Hybrid Polling initialization issue
  2025-05-08  2:18 ` [PATCH] Fix Hybrid Polling initialization issue hexue
@ 2025-05-08 15:05   ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2025-05-08 15:05 UTC (permalink / raw)
  To: hexue, asml.silence, io-uring, linux-kernel; +Cc: peiwei.li

On 5/7/25 8:18 PM, hexue wrote:
> 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.

Patch title should be:

io_uring/uring_cmd: fix hybrid polling initialization issue

and then you need a Fixes line and a stable tag, if appropriate.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-05-08 15:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20250508021828epcas5p21b9313ec7c9e0da2e7e49db36854aa22@epcas5p2.samsung.com>
2025-05-08  2:18 ` [PATCH] Fix Hybrid Polling initialization issue hexue
2025-05-08 15:05   ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox