public inbox for [email protected]
 help / color / mirror / Atom feed
From: Caleb Sander Mateos <[email protected]>
To: Jens Axboe <[email protected]>, Pavel Begunkov <[email protected]>
Cc: [email protected], [email protected]
Subject: Re: [PATCH] io_uring: use lockless_cq flag in io_req_complete_post()
Date: Tue, 18 Feb 2025 09:29:49 -0800	[thread overview]
Message-ID: <CADUfDZo5CMo4cQeZCQ3z5vNFSJ_M_Ckeq=bj2rkA6-sq7ABSNw@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>

Hi Jens,
Gentle ping on this patch that Li Zetao reviewed last week. Do you
think the comment should be removed/reworded to match the new if
condition?

Thanks,
Caleb

On Tue, Feb 11, 2025 at 4:51 PM Caleb Sander Mateos
<[email protected]> wrote:
>
> io_uring_create() computes ctx->lockless_cq as:
> ctx->task_complete || (ctx->flags & IORING_SETUP_IOPOLL)
>
> So use it to simplify that expression in io_req_complete_post().
>
> Signed-off-by: Caleb Sander Mateos <[email protected]>
> ---
>  io_uring/io_uring.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
> index ec98a0ec6f34..0bd94599df81 100644
> --- a/io_uring/io_uring.c
> +++ b/io_uring/io_uring.c
> @@ -897,11 +897,11 @@ static void io_req_complete_post(struct io_kiocb *req, unsigned issue_flags)
>
>         /*
>          * Handle special CQ sync cases via task_work. DEFER_TASKRUN requires
>          * the submitter task context, IOPOLL protects with uring_lock.
>          */
> -       if (ctx->task_complete || (ctx->flags & IORING_SETUP_IOPOLL)) {
> +       if (ctx->lockless_cq) {
>                 req->io_task_work.func = io_req_task_complete;
>                 io_req_task_work_add(req);
>                 return;
>         }
>
> --
> 2.45.2
>

  parent reply	other threads:[~2025-02-18 17:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-12  0:51 [PATCH] io_uring: use lockless_cq flag in io_req_complete_post() Caleb Sander Mateos
2025-02-13 14:04 ` lizetao
2025-02-18 17:29 ` Caleb Sander Mateos [this message]
2025-02-18 17:32 ` 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 \
    --in-reply-to='CADUfDZo5CMo4cQeZCQ3z5vNFSJ_M_Ckeq=bj2rkA6-sq7ABSNw@mail.gmail.com' \
    [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