public inbox for [email protected]
 help / color / mirror / Atom feed
From: Dylan Yudaken <[email protected]>
To: Jens Axboe <[email protected]>, Pavel Begunkov <[email protected]>
Cc: <[email protected]>, <[email protected]>,
	<[email protected]>, Dylan Yudaken <[email protected]>
Subject: [PATCH 1/3] io_uring: register single issuer task at creation
Date: Mon, 26 Sep 2022 07:03:02 -0700	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

Instead of picking the task from the first submitter task, rather use the
creator task.
The downside of this is that users are unable to move tasks before
submitting.

However this simplifies the logic here. For example CQEs are able to be
posted by io_uring_register, which could also be from a separate
task. This could be confusing as this does not count as a submit, and so
would not be the registered task.

Additionally this removes init logic from the submission path, which can
always be a bit confusing.

Signed-off-by: Dylan Yudaken <[email protected]>
---
 io_uring/io_uring.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 2965b354efc8..3f40defd721d 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -3357,6 +3357,9 @@ static __cold int io_uring_create(unsigned entries, struct io_uring_params *p,
 		goto err;
 	}
 
+	if (ctx->flags & IORING_SETUP_SINGLE_ISSUER)
+		ctx->submitter_task = get_task_struct(current);
+
 	file = io_uring_get_file(ctx);
 	if (IS_ERR(file)) {
 		ret = PTR_ERR(file);
-- 
2.30.2


  reply	other threads:[~2022-09-26 15:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-26 14:03 [PATCH 0/3] io_uring: register single issuer task at creation Dylan Yudaken
2022-09-26 14:03 ` Dylan Yudaken [this message]
2022-09-26 14:03 ` [PATCH 2/3] io_uring: simplify __io_uring_add_tctx_node Dylan Yudaken
2022-09-26 14:03 ` [PATCH 3/3] io_uring: remove io_register_submitter Dylan Yudaken
2022-09-26 14:37 ` [PATCH 0/3] io_uring: register single issuer task at creation 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] \
    /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