代码拉取完成,页面将自动刷新
From 5c31734118432639f7758d4671f1f05348914d63 Mon Sep 17 00:00:00 2001
From: Hao Xu <haoxu@linux.alibaba.com>
Date: Mon, 10 May 2021 11:34:29 +0800
Subject: [PATCH 2/4] support us granularity of io_sq_thread_idle
add flag IORING_SETUP_IDLE_US to support microsecond granularity
io_sq_thread_idle.
Signed-off-by: Hao Xu <haoxu@linux.alibaba.com>
---
man/io_uring_setup.2 | 8 +++++++-
src/include/liburing/io_uring.h | 1 +
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/man/io_uring_setup.2 b/man/io_uring_setup.2
index 30a2306..082507c 100644
--- a/man/io_uring_setup.2
+++ b/man/io_uring_setup.2
@@ -83,7 +83,9 @@ doing a single system call.
If the kernel thread is idle for more than
.I sq_thread_idle
-milliseconds, it will set the
+milliseconds/microseconds(depends on if
+.B IORING_SETUP_IDLE_US
+is set), it will set the
.B IORING_SQ_NEED_WAKEUP
bit in the
.I flags
@@ -287,6 +289,10 @@ Note that if this flag is set then it is the application's responsibility to per
trigger work (for example via any of the CQE waiting functions) or else completions may
not be delivered.
Available since 6.1.
+.B IORING_SETUP_IDLE_US
+If this flag is set, the unit of
+.I sq_thread_idle
+is microsecond, rather than millisecond.
.PP
If no flags are specified, the io_uring instance is setup for
interrupt driven I/O. I/O may be submitted using
diff --git a/src/include/liburing/io_uring.h b/src/include/liburing/io_uring.h
index d4a0d83..8291de7 100644
--- a/src/include/liburing/io_uring.h
+++ b/src/include/liburing/io_uring.h
@@ -166,6 +166,7 @@ enum {
* Only one task is allowed to submit requests
*/
#define IORING_SETUP_SINGLE_ISSUER (1U << 12)
+#define IORING_SETUP_IDLE_US (1U << 30) /* unit of thread_idle is microsecond */
/* use percpu SQ poll thread */
#define IORING_SETUP_SQPOLL_PERCPU (1U << 31)
--
2.31.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。