Re: [PATCH 08/11] io_uring: add function to unregister fixed workers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux