[PATCH 07/19] io-wq: move worker state flags to io-wq.h

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

 



From: Hao Xu <howeyxu@xxxxxxxxxxx>

Move worker state flags to io-wq.h so that we can levarage them later.

Signed-off-by: Hao Xu <howeyxu@xxxxxxxxxxx>
---
 io_uring/io-wq.c | 7 -------
 io_uring/io-wq.h | 8 ++++++++
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/io_uring/io-wq.c b/io_uring/io-wq.c
index 5f54af7579a4..55f1063f24c7 100644
--- a/io_uring/io-wq.c
+++ b/io_uring/io-wq.c
@@ -24,13 +24,6 @@
 
 #define WORKER_IDLE_TIMEOUT	(5 * HZ)
 
-enum {
-	IO_WORKER_F_UP		= 1,	/* up and active */
-	IO_WORKER_F_RUNNING	= 2,	/* account as running */
-	IO_WORKER_F_FREE	= 4,	/* worker on free list */
-	IO_WORKER_F_BOUND	= 8,	/* is doing bounded work */
-};
-
 enum {
 	IO_WQ_BIT_EXIT		= 0,	/* wq exiting */
 };
diff --git a/io_uring/io-wq.h b/io_uring/io-wq.h
index 66d2aeb17951..504a8a8e3fd8 100644
--- a/io_uring/io-wq.h
+++ b/io_uring/io-wq.h
@@ -27,6 +27,14 @@ enum io_uringlet_state {
 	IO_URINGLET_SCHEDULED,
 };
 
+enum {
+	IO_WORKER_F_UP		= 1,	/* up and active */
+	IO_WORKER_F_RUNNING	= 2,	/* account as running */
+	IO_WORKER_F_FREE	= 4,	/* worker on free list */
+	IO_WORKER_F_BOUND	= 8,	/* is doing bounded work */
+	IO_WORKER_F_SCHEDULED	= 16,	/* worker had been scheduled out before */
+};
+
 typedef struct io_wq_work *(free_work_fn)(struct io_wq_work *);
 typedef int (io_wq_work_fn)(struct io_wq_work *);
 
-- 
2.25.1




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux