[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADUfDZo5CMo4cQeZCQ3z5vNFSJ_M_Ckeq=bj2rkA6-sq7ABSNw@mail.gmail.com>
Date: Tue, 18 Feb 2025 09:29:49 -0800
From: Caleb Sander Mateos <csander@...estorage.com>
To: Jens Axboe <axboe@...nel.dk>, Pavel Begunkov <asml.silence@...il.com>
Cc: io-uring@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] io_uring: use lockless_cq flag in io_req_complete_post()
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
<csander@...estorage.com> 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 <csander@...estorage.com>
> ---
> 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
>
Powered by blists - more mailing lists