代码拉取完成,页面将自动刷新
From cd0ee5df307beda0cc8a14af09ffdaafcd5e0e6a Mon Sep 17 00:00:00 2001
From: Xiaoguang Wang <xiaoguang.wang@linux.alibaba.com>
Date: Thu, 6 Aug 2020 14:23:01 +0800
Subject: [PATCH 1/4] Add percpu io sq thread support
Add a new IORING_SETUP_SQPOLL_PERCPU flag, this flag is only meaningful
when IORING_SETUP_SQPOLL and IORING_SETUP_SQ_AFF are both specified, that
means if user creates multiple io_uring instances which are all bound
to one same cpu, only a kernel thread is created for this cpu to perform
these io_uring instances' submission queue polling.
Signed-off-by: Xiaoguang Wang <xiaoguang.wang@linux.alibaba.com>
Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com>
---
man/io_uring_setup.2 | 9 +++++++++
src/include/liburing/io_uring.h | 2 ++
2 files changed, 11 insertions(+)
diff --git a/man/io_uring_setup.2 b/man/io_uring_setup.2
index cd69994..30a2306 100644
--- a/man/io_uring_setup.2
+++ b/man/io_uring_setup.2
@@ -147,6 +147,15 @@ is specified. When cgroup setting
changes (typically in container environment), the bounded cpu set may be
changed as well.
.TP
+.B IORING_SETUP_SQPOLL_PERCPU
+This flag is only meaningful when
+.B IORING_SETUP_SQPOLL
+and
+.B IORING_SETUP_SQ_AFF
+are both specified, that means if user creates multiple io_uring instances
+which are all bound to one same cpu, only a kernel thread is created for this
+cpu to perform these io_uring instances' submission queue polling.
+.TP
.B IORING_SETUP_CQSIZE
Create the completion queue with
.IR "struct io_uring_params.cq_entries"
diff --git a/src/include/liburing/io_uring.h b/src/include/liburing/io_uring.h
index a3e0920..d4a0d83 100644
--- a/src/include/liburing/io_uring.h
+++ b/src/include/liburing/io_uring.h
@@ -166,6 +166,8 @@ enum {
* Only one task is allowed to submit requests
*/
#define IORING_SETUP_SINGLE_ISSUER (1U << 12)
+/* use percpu SQ poll thread */
+#define IORING_SETUP_SQPOLL_PERCPU (1U << 31)
/*
* Defer running task work to get events.
--
2.31.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。