All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Jens Axboe <axboe@kernel.dk>
Cc: Keith Busch <kbusch@meta.com>,
	io-uring@vger.kernel.org, asml.silence@gmail.com
Subject: Re: [PATCH] io_uring: save repeated issue_flags
Date: Tue, 5 Dec 2023 16:02:43 -0700	[thread overview]
Message-ID: <ZW-sE1hOG4EB3ktS@kbusch-mbp> (raw)
In-Reply-To: <43ff7474-5174-4738-88d9-9c43517ae235@kernel.dk>

On Tue, Dec 05, 2023 at 03:00:52PM -0700, Jens Axboe wrote:
> >  		if (!file->f_op->uring_cmd_iopoll)
> >  			return -EOPNOTSUPP;
> > -		issue_flags |= IO_URING_F_IOPOLL;
> >  		req->iopoll_completed = 0;
> >  	}
> >  
> > +	issue_flags |= ctx->issue_flags;
> >  	ret = file->f_op->uring_cmd(ioucmd, issue_flags);
> >  	if (ret == -EAGAIN) {
> >  		if (!req_has_async_data(req)) {
> 
> I obviously like this idea, but it should be accompanied by getting rid
> of ->compat and ->syscall_iopoll in the ctx as well?

Yeah, I considered that, and can incorporate it here. Below is a snippet
of what I had earlier to make that happen, but felt the purpose for the
"issue_flags" was uring_cmd specific and disconnected from everyone
else. Maybe I'm overthinking it...

diff --git a/io_uring/net.c b/io_uring/net.c
index 75d494dad7e2c..c11313e77495c 100644
--- a/io_uring/net.c
+++ b/io_uring/net.c
@@ -549,7 +549,7 @@ static int io_recvmsg_copy_hdr(struct io_kiocb *req,
 	iomsg->msg.msg_iter.nr_segs = 0;

 #ifdef CONFIG_COMPAT
-	if (req->ctx->compat)
+	if (req->ctx->issue_flags & IO_URING_F_COMPAT)
 		return __io_compat_recvmsg_copy_hdr(req, iomsg);
 #endif

  reply	other threads:[~2023-12-05 23:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-05 21:55 [PATCH] io_uring: save repeated issue_flags Keith Busch
2023-12-05 22:00 ` Jens Axboe
2023-12-05 23:02   ` Keith Busch [this message]
2023-12-05 23:11     ` Jens Axboe
2023-12-06  1:31       ` Pavel Begunkov
2023-12-06  1:26   ` Pavel Begunkov
2023-12-06  1:41     ` Jens Axboe
2023-12-06  1:51       ` Pavel Begunkov

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=ZW-sE1hOG4EB3ktS@kbusch-mbp \
    --to=kbusch@kernel.org \
    --cc=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=kbusch@meta.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.