From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Anvik Loitongbam <permissiontogallop@gmail.com>
Cc: Jens Axboe <axboe@kernel.dk>,
Pavel Begunkov <asml.silence@gmail.com>,
Olivier Langlois <olivier@trillion01.com>,
io-uring@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] io_uring/napi: clean up list traversal with list_for_each_entry_safe()
Date: Mon, 2 Nov 2026 16:34:40 +0100 [thread overview]
Message-ID: <20261102153440.e7a1o1RB@linutronix.de> (raw)
In-Reply-To: <20261029144745.23792-1-permissiontogallop@gmail.com>
On 2026-10-29 20:17:45 [+0530], Anvik Loitongbam wrote:
> Switch both loops to the standard list_for_each_entry_safe() pattern and
> remove the explanatory comment.
I don't think this is useful as in clean-up or needed. The 'next'
pointer is pre-loaded with the next element but list_del_rcu() does not
destroy it (unlike list_del()). The spinlock_t holds off the grace
period. The item's next pointer needs to remain valid for a RCU
traversal that can happen.
The comment in __io_napi_remove_stale() explained the situation to
non-RCU fluent person. The list is not touched in io_napi_free() at all.
But okay, it is not a hot path…
> Signed-off-by: Anvik Loitongbam <permissiontogallop@gmail.com>
Sebastian
prev parent reply other threads:[~2026-11-02 15:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-29 14:47 Anvik Loitongbam
2026-10-29 15:34 ` Jens Axboe
2026-11-02 15:34 ` Sebastian Andrzej Siewior [this message]
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=20261102153440.e7a1o1RB@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=io-uring@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=olivier@trillion01.com \
--cc=permissiontogallop@gmail.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®