On 6/9/23 13:20, Hao Xu wrote:
From: Hao Xu <howeyxu@xxxxxxxxxxx>
Add a new register api to unregister fixed workers.
Signed-off-by: Hao Xu <howeyxu@xxxxxxxxxxx>
---
include/uapi/linux/io_uring.h | 3 +++
io_uring/io-wq.c | 50 ++++++++++++++++++++++++++++++++++-
io_uring/io-wq.h | 1 +
io_uring/io_uring.c | 45 +++++++++++++++++++++++++++++++
4 files changed, 98 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h
index 6dc43be5009d..b0a6e3106b42 100644
--- a/include/uapi/linux/io_uring.h
+++ b/include/uapi/linux/io_uring.h
@@ -538,6 +538,9 @@ enum {
/* set/get number of fixed workers */
IORING_REGISTER_IOWQ_FIXED_WORKERS = 26,
+ /* destroy fixed workers */
+ IORING_UNREGISTER_IOWQ_FIXED_WORKERS = 27,
Do we need a new code? I think it's cleaner if we use
IORING_REGISTER_IOWQ_FIXED_WORKERS and do sth like
struct io_uring_fixed_worker_arg arg;
if (arg.nr_workers)
do_unregister_fixed_workers();
...
--
Pavel Begunkov