All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hao Xu <haoxu@linux.alibaba.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: io-uring@vger.kernel.org, Pavel Begunkov <asml.silence@gmail.com>,
	Joseph Qi <joseph.qi@linux.alibaba.com>
Subject: [PATCH 1/3] io_uring: add data structure for graph sqe feature
Date: Tue, 14 Dec 2021 13:57:32 +0800	[thread overview]
Message-ID: <20211214055734.61702-2-haoxu@linux.alibaba.com> (raw)
In-Reply-To: <20211214055734.61702-1-haoxu@linux.alibaba.com>

Add basic data structure for graph sqe feature.

Signed-off-by: Hao Xu <haoxu@linux.alibaba.com>
---
 fs/io_uring.c | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/fs/io_uring.c b/fs/io_uring.c
index d86372664f9f..e96d38d268a8 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -326,8 +326,25 @@ struct io_submit_state {
 	struct blk_plug		plug;
 };
 
+struct io_graph_child_node {
+	struct io_graph_node		*to;
+	struct io_graph_child_node	*next;
+};
+
+struct io_graph_node {
+	struct io_kiocb			*req;
+	struct io_graph_child_node	*children;
+	atomic_t			refs;
+};
+
+struct io_graph_info {
+	int				nr_nodes;
+	int				pos;
+	struct io_graph_node		**graph_array;
+};
+
 struct io_ring_ctx {
-	/* const or read-mostly hot data */
+	/* cons t or read-mostly hot data */
 	struct {
 		struct percpu_ref	refs;
 
@@ -459,6 +476,7 @@ struct io_ring_ctx {
 		u32				iowq_limits[2];
 		bool				iowq_limits_set;
 	};
+	struct io_graph_info			graph_info;
 };
 
 struct io_uring_task {
-- 
2.25.1


  reply	other threads:[~2021-12-14  5:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-14  5:57 [POC RFC 0/3] support graph like dependent sqes Hao Xu
2021-12-14  5:57 ` Hao Xu [this message]
2021-12-14  5:57 ` [PATCH 2/3] io_uring: implement new sqe opcode to build graph like links Hao Xu
2021-12-14  5:57 ` [PATCH 3/3] io_uring: implement logic of IOSQE_GRAPH request Hao Xu
2021-12-14 15:21 ` [POC RFC 0/3] support graph like dependent sqes Pavel Begunkov
2021-12-14 16:53   ` Hao Xu
2021-12-14 18:16     ` Pavel Begunkov
2021-12-16 16:55       ` Hao Xu
2021-12-17 19:33         ` Pavel Begunkov
2021-12-18  6:57           ` Hao Xu
2021-12-21 16:19             ` Pavel Begunkov
2021-12-23  4:14               ` Hao Xu
2021-12-23 10:06 ` Christian Dietrich
2021-12-27  3:27   ` Hao Xu
2021-12-27  5:49     ` Christian Dietrich

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 \
    --in-reply-to=20211214055734.61702-2-haoxu@linux.alibaba.com \
    --to=haoxu@linux.alibaba.com \
    --cc=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=joseph.qi@linux.alibaba.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.