From: Pavel Begunkov <asml.silence@gmail.com>
To: Yao Kai <yaokai34@huawei.com>, axboe@kernel.dk
Cc: io-uring@vger.kernel.org, linux-kernel@vger.kernel.org,
liuyongqiang13@huawei.com
Subject: Re: [PATCH] io_uring: initialize task context before running the BPF loop
Date: Tue, 22 Sep 2026 12:58:07 +0100 [thread overview]
Message-ID: <d6d9cb28-50f1-474c-ba11-d634fcaad394@gmail.com> (raw)
In-Reply-To: <20260922065443.359417-1-yaokai34@huawei.com>
On 9/22/26 07:54, Yao Kai wrote:
...> ---
> io_uring/loop.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/io_uring/loop.c b/io_uring/loop.c
> index bbbb6ef14e6a..c923cae6dfc7 100644
> --- a/io_uring/loop.c
> +++ b/io_uring/loop.c
> @@ -2,6 +2,7 @@
> #include "io_uring.h"
> #include "wait.h"
> #include "loop.h"
> +#include "tctx.h"
>
> static inline int io_loop_nr_cqes(const struct io_ring_ctx *ctx,
> const struct iou_loop_params *lp)
> @@ -84,6 +85,10 @@ int io_run_loop(struct io_ring_ctx *ctx)
> if (!io_allowed_run_tw(ctx))
> return -EEXIST;
>
> + ret = io_uring_add_tctx_node(ctx);
> + if (unlikely(ret))
> + return ret;
> +
Looks good in general, but can you move it a couple of lines
up before io_allowed_run_tw()? Thanks
> mutex_lock(&ctx->uring_lock);
> ret = __io_run_loop(ctx);
> mutex_unlock(&ctx->uring_lock);
--
Pavel Begunkov
next prev parent reply other threads:[~2026-09-22 11:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 6:54 Yao Kai
2026-09-22 11:58 ` Pavel Begunkov [this message]
2026-09-23 1:43 ` [PATCH v2] " Yao Kai
2026-09-23 11:20 ` 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=d6d9cb28-50f1-474c-ba11-d634fcaad394@gmail.com \
--to=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=io-uring@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liuyongqiang13@huawei.com \
--cc=yaokai34@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®