public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH liburing v1] register: Remove deprecated io_uring_cqwait_reg_arg
@ 2025-05-16  9:03 Haiyue Wang
  0 siblings, 0 replies; only message in thread
From: Haiyue Wang @ 2025-05-16  9:03 UTC (permalink / raw)
  To: io-uring; +Cc: Haiyue Wang

The opcode IORING_REGISTER_MEM_REGION and its argument io_uring_cqwait_reg_arg
have been removed by [1] and [2].

And a more generic opcode IORING_REGISTER_MEM_REGION has been introduced by [3]
since Linux 6.13.

[1]: https://git.kernel.org/torvalds/c/83e041522eb9
[2]: https://git.kernel.org/torvalds/c/c750629caeca
[3]: https://git.kernel.org/torvalds/c/93238e661855

Signed-off-by: Haiyue Wang <haiyuewa@163.com>
---
 man/io_uring_enter.2            |  4 +-
 man/io_uring_register.2         | 94 ---------------------------------
 src/include/liburing/io_uring.h | 14 -----
 3 files changed, 2 insertions(+), 110 deletions(-)

diff --git a/man/io_uring_enter.2 b/man/io_uring_enter.2
index bbae6fb..99c0ab2 100644
--- a/man/io_uring_enter.2
+++ b/man/io_uring_enter.2
@@ -133,8 +133,8 @@ is not a pointer to a
 but merely an offset into an area of wait regions previously registered with
 .BR io_uring_register (2)
 using the
-.B IORING_REGISTER_CQWAIT_REG
-operation. Available since 6.12
+.B IORING_REGISTER_MEM_REGION
+operation. Available since 6.13
 
 .PP
 .PP
diff --git a/man/io_uring_register.2 b/man/io_uring_register.2
index a81d950..32473a2 100644
--- a/man/io_uring_register.2
+++ b/man/io_uring_register.2
@@ -950,100 +950,6 @@ structure will get the necessary offsets copied back upon successful completion
 of this system call, which can be used to memory map the ring just like how
 a new ring would've been mapped. Available since kernel 6.13.
 
-.TP
-.B IORING_REGISTER_CQWAIT_REG
-Supports registering fixed wait regions, avoiding unnecessary copying in
-of
-.IR struct io_uring_getevents_arg
-for wait operations that specify a timeout or minimum timeout. Takes a pointer
-to a
-.IR struct io_uring_cqwait_reg_arg
-structure, which looks as follows:
-.PP
-.in +12n
-.EX
-struct io_uring_cqwait_reg_arg {
-    __u32 flags;
-    __u32 struct_size;
-    __u32 nr_entries;
-    __u32 pad;
-    __u64 user_addr;
-    __u64 pad2[2];
-};
-.EE
-.in
-.TP
-.PP
-where
-.IR flags
-specifies modifier flags (must currently be
-.B 0 ),
-.IR struct_size
-must be set to the size of the struct, and
-.IR user_addr
-must be set to the region being registered as wait regions. The pad fields
-must all be cleared to
-.B 0 .
-Each wait regions looks as follows:
-.PP
-.in +12n
-.EX
-struct io_uring_reg_wait {
-    struct __kernel_timespec ts;
-    __u32                    min_wait_usec;
-    __u32                    flags;
-    __u64                    sigmask;
-    __u32                    sigmask_sz;
-    __u32                    pad[3];
-    __u64                    pad2[2];
-};
-.EE
-.in
-.TP
-.PP
-where
-.IR ts
-holds the timeout information for this region
-.IR flags
-holds information about the timeout region,
-.IR sigmask
-is a pointer to a signal mask, if used, and
-.IR sigmask_sz
-is the size of that signal mask. The pad fields must all be cleared to
-.B 0 .
-Currently the only valid flag is
-.B IORING_REG_WAIT_TS ,
-which, if set, says that the values in
-.IR ts
-are valid and should be used for a timeout operation. The
-.IR user_addr
-field of
-.IR struct io_uring_cqwait_reg_arg
-must be set to an address of
-.IR struct io_uring_cqwait_reg
-members, an up to a page size can be mapped. At the size of 64 bytes per
-region, that allows at least 64 individual regions on a 4k page size system.
-The offsets of these regions are used for an
-.BR io_uring_enter (2)
-system call, with the first one being 0, second one 1, and so forth. After
-registration of the wait regions,
-.BR io_uring_enter (2)
-may be used with the enter flag of
-.B IORING_ENTER_EXT_ARG_REG and an
-.IR argp
-set to the wait region offset, rather than a pointer to a
-.IR struct io_uring_getevent_arg
-structure. If used with
-.B IORING_ENTER_GETEVENTS ,
-then the wait operation will use the information in the registered wait
-region rather than needing a io_uring_getevent_arg structure copied for each
-operation. For high frequency waits, this can save considerable CPU cycles.
-Note: once a region has been registered, it cannot get unregistered. It lives
-for the life of the ring. Individual wait region offset may be modified before
-any
-.BR io_uring_enter (2)
-system call. Available since kernel 6.13.
-
 .SH RETURN VALUE
 On success,
 .BR io_uring_register (2)
diff --git a/src/include/liburing/io_uring.h b/src/include/liburing/io_uring.h
index a89d0d1..73d2997 100644
--- a/src/include/liburing/io_uring.h
+++ b/src/include/liburing/io_uring.h
@@ -851,20 +851,6 @@ enum {
 	IORING_REG_WAIT_TS		= (1U << 0),
 };
 
-/*
- * Argument for IORING_REGISTER_CQWAIT_REG, registering a region of
- * struct io_uring_reg_wait that can be indexed when io_uring_enter(2) is
- * called rather than pass in a wait argument structure separately.
- */
-struct io_uring_cqwait_reg_arg {
-	__u32		flags;
-	__u32		struct_size;
-	__u32		nr_entries;
-	__u32		pad;
-	__u64		user_addr;
-	__u64		pad2[3];
-};
-
 /*
  * Argument for io_uring_enter(2) with
  * IORING_GETEVENTS | IORING_ENTER_EXT_ARG_REG set, where the actual argument
-- 
2.49.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-05-16  9:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-16  9:03 [PATCH liburing v1] register: Remove deprecated io_uring_cqwait_reg_arg Haiyue Wang

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