All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/5] io_uring/uring_cmd: allow non-iopoll cmds with IORING_SETUP_IOPOLL
@ 2026-02-27 22:34 Caleb Sander Mateos
  2026-02-27 22:34 ` [PATCH v4 1/5] io_uring: add REQ_F_IOPOLL Caleb Sander Mateos
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Caleb Sander Mateos @ 2026-02-27 22:34 UTC (permalink / raw)
  To: Jens Axboe, Christoph Hellwig, Keith Busch, Sagi Grimberg
  Cc: io-uring, linux-nvme, linux-kernel, Anuj Gupta, Kanchan Joshi,
	Ming Lei, Caleb Sander Mateos

Currently, creating an io_uring with IORING_SETUP_IOPOLL requires all
requests issued to it to support iopoll. This prevents, for example,
using ublk zero-copy together with IORING_SETUP_IOPOLL, as ublk
zero-copy buffer registrations are performed using a uring_cmd. There's
no technical reason why these non-iopoll uring_cmds can't be supported.
They will either complete synchronously or via an external mechanism
that calls io_uring_cmd_done(), io_uring_cmd_post_mshot_cqe32(), or
io_uring_mshot_cmd_post_cqe(), so they don't need to be polled.

Allow uring_cmd requests to be issued to IORING_SETUP_IOPOLL io_urings
even if their files don't implement ->uring_cmd_iopoll().

Use a new REQ_F_IOPOLL flag to track whether a request is using iopoll.
This makes the iopoll_queue opcode definition flag unnecessary.

The last commit removes an unnecessary IO_URING_F_IOPOLL check in
nvme_dev_uring_cmd() as NVMe admin passthru commands can be issued to
IORING_SETUP_IOPOLL io_urings now.

v4: check non-iopoll CQEs against min_events in io_iopoll_check() (Ming)

v3: fix REW -> REQ typo (Anuj)

v2:
- Add REQ_F_IOPOLL request flag, remove redundant iopoll_queue
- Split IORING_OP_URING_CMD128 fix to a separate commit

Caleb Sander Mateos (5):
  io_uring: add REQ_F_IOPOLL
  io_uring: remove iopoll_queue from struct io_issue_def
  io_uring: count CQEs in io_iopoll_check()
  io_uring/uring_cmd: allow non-iopoll cmds with IORING_SETUP_IOPOLL
  nvme: remove nvme_dev_uring_cmd() IO_URING_F_IOPOLL check

 drivers/nvme/host/ioctl.c      |  4 ----
 include/linux/io_uring_types.h |  3 +++
 io_uring/io_uring.c            | 28 +++++++---------------------
 io_uring/opdef.c               | 10 ----------
 io_uring/opdef.h               |  2 --
 io_uring/rw.c                  | 11 ++++++-----
 io_uring/uring_cmd.c           |  9 ++++-----
 7 files changed, 20 insertions(+), 47 deletions(-)

-- 
2.45.2


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

end of thread, other threads:[~2026-02-28  9:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-27 22:34 [PATCH v4 0/5] io_uring/uring_cmd: allow non-iopoll cmds with IORING_SETUP_IOPOLL Caleb Sander Mateos
2026-02-27 22:34 ` [PATCH v4 1/5] io_uring: add REQ_F_IOPOLL Caleb Sander Mateos
2026-02-27 22:35 ` [PATCH v4 2/5] io_uring: remove iopoll_queue from struct io_issue_def Caleb Sander Mateos
2026-02-27 22:35 ` [PATCH v4 3/5] io_uring: count CQEs in io_iopoll_check() Caleb Sander Mateos
2026-02-28  9:45   ` Ming Lei
2026-02-27 22:35 ` [PATCH v4 4/5] io_uring/uring_cmd: allow non-iopoll cmds with IORING_SETUP_IOPOLL Caleb Sander Mateos
2026-02-27 22:35 ` [PATCH v4 5/5] nvme: remove nvme_dev_uring_cmd() IO_URING_F_IOPOLL check Caleb Sander Mateos

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.