public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] io_uring/uring_cmd: fix hybrid polling initialization issue
       [not found] <CGME20250512052032epcas5p46bb23adcb4a467aa7f66b82d3548b124@epcas5p4.samsung.com>
@ 2025-05-12  5:20 ` hexue
  2025-05-12 12:21   ` Kanchan Joshi/Kanchan Joshi
  2025-05-12 13:18   ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: hexue @ 2025-05-12  5:20 UTC (permalink / raw)
  To: axboe, asml.silence, io-uring, linux-kernel; +Cc: 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.

Fixes: 01ee194d1aba ("io_uring: add support for hybrid IOPOLL")
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 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


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

* Re: [PATCH] io_uring/uring_cmd: fix hybrid polling initialization issue
  2025-05-12  5:20 ` [PATCH] io_uring/uring_cmd: fix hybrid polling initialization issue hexue
@ 2025-05-12 12:21   ` Kanchan Joshi/Kanchan Joshi
  2025-05-12 13:18   ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Kanchan Joshi/Kanchan Joshi @ 2025-05-12 12:21 UTC (permalink / raw)
  To: hexue, axboe, asml.silence, io-uring, linux-kernel

On 5/12/2025 10:50 AM, 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.
> 
> Fixes: 01ee194d1aba ("io_uring: add support for hybrid IOPOLL")
> Signed-off-by: hexue<xue01.he@samsung.com>

So without this patch, liburing passthrough test 
(io_uring_passthrough.t) gets stuck.
With this patch, I do not see the issue and test runs to completion.

This may need stable tag though
Cc: stable@vger.kernel.org # 6.13+

With that,
Reviewed and Tested by: Kanchan Joshi <joshi.k@samsung.com>

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

* Re: [PATCH] io_uring/uring_cmd: fix hybrid polling initialization issue
  2025-05-12  5:20 ` [PATCH] io_uring/uring_cmd: fix hybrid polling initialization issue hexue
  2025-05-12 12:21   ` Kanchan Joshi/Kanchan Joshi
@ 2025-05-12 13:18   ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2025-05-12 13:18 UTC (permalink / raw)
  To: asml.silence, io-uring, linux-kernel, hexue


On Mon, 12 May 2025 13:20:25 +0800, 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.
> 
> 

Applied, thanks!

[1/1] io_uring/uring_cmd: fix hybrid polling initialization issue
      commit: 63166b815dc163b2e46426cecf707dc5923d6d13

Best regards,
-- 
Jens Axboe




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

end of thread, other threads:[~2025-05-12 13:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20250512052032epcas5p46bb23adcb4a467aa7f66b82d3548b124@epcas5p4.samsung.com>
2025-05-12  5:20 ` [PATCH] io_uring/uring_cmd: fix hybrid polling initialization issue hexue
2025-05-12 12:21   ` Kanchan Joshi/Kanchan Joshi
2025-05-12 13:18   ` Jens Axboe

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