From: hexue <xue01.he@samsung.com>
To: axboe@kernel.dk, asml.silence@gmail.com,
io-uring@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: peiwei.li@samsung.com, hexue <xue01.he@samsung.com>
Subject: [PATCH] Fix Hybrid Polling initialization issue
Date: Thu, 8 May 2025 10:18:22 +0800 [thread overview]
Message-ID: <20250508021822.1781033-1-xue01.he@samsung.com> (raw)
In-Reply-To: CGME20250508021828epcas5p21b9313ec7c9e0da2e7e49db36854aa22@epcas5p2.samsung.com
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
next parent reply other threads:[~2025-05-08 2:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20250508021828epcas5p21b9313ec7c9e0da2e7e49db36854aa22@epcas5p2.samsung.com>
2025-05-08 2:18 ` hexue [this message]
2025-05-08 15:05 ` [PATCH] Fix Hybrid Polling initialization issue Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250508021822.1781033-1-xue01.he@samsung.com \
--to=xue01.he@samsung.com \
--cc=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=io-uring@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peiwei.li@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox