public inbox for [email protected]
 help / color / mirror / Atom feed
From: Eugene Syromiatnikov <[email protected]>
To: Jens Axboe <[email protected]>, Pavel Begunkov <[email protected]>
Cc: [email protected], [email protected],
	"Dmitry V. Levin" <[email protected]>,
	[email protected]
Subject: [PATCH] io-wq: expose IO_WQ_ACCT_* enumeration items to UAPI
Date: Sun, 12 Sep 2021 14:24:11 +0200	[thread overview]
Message-ID: <[email protected]> (raw)

These are used to index aargument of IORING_REGISTER_IOWQ_MAX_WORKERS
io_uring_register command, so they are to be exposed in UAPI.

Signed-off-by: Eugene Syromiatnikov <[email protected]>
---
 fs/io-wq.c                    | 7 +------
 include/uapi/linux/io_uring.h | 8 ++++++++
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/fs/io-wq.c b/fs/io-wq.c
index 6c55362..5e7cd7c 100644
--- a/fs/io-wq.c
+++ b/fs/io-wq.c
@@ -14,6 +14,7 @@
 #include <linux/rculist_nulls.h>
 #include <linux/cpu.h>
 #include <linux/tracehook.h>
+#include <uapi/linux/io_uring.h>
 
 #include "io-wq.h"
 
@@ -77,12 +78,6 @@ struct io_wqe_acct {
 	unsigned long flags;
 };
 
-enum {
-	IO_WQ_ACCT_BOUND,
-	IO_WQ_ACCT_UNBOUND,
-	IO_WQ_ACCT_NR,
-};
-
 /*
  * Per-node worker thread pool
  */
diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h
index 59ef351..d67a3cc 100644
--- a/include/uapi/linux/io_uring.h
+++ b/include/uapi/linux/io_uring.h
@@ -324,6 +324,14 @@ enum {
 	IORING_REGISTER_LAST
 };
 
+/* io-wq worker limit categories */
+enum {
+	IO_WQ_ACCT_BOUND,
+	IO_WQ_ACCT_UNBOUND,
+
+	IO_WQ_ACCT_NR /* Non-UAPI */
+};
+
 /* deprecated, see struct io_uring_rsrc_update */
 struct io_uring_files_update {
 	__u32 offset;
-- 
2.1.4


             reply	other threads:[~2021-09-12 12:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-12 12:24 Eugene Syromiatnikov [this message]
2021-09-12 18:29 ` [PATCH] io-wq: expose IO_WQ_ACCT_* enumeration items to UAPI Jens Axboe
2021-09-12 22:24   ` Dmitry V. Levin
2021-09-12 22:49     ` 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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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