From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: linux-rdma@vger.kernel.org
Cc: Jason Gunthorpe <jgg@nvidia.com>,
Leon Romanovsky <leonro@nvidia.com>,
Petr Pavlu <petr.pavlu@suse.com>,
"Paul E. McKenney" <paulmck@kernel.org>
Subject: [Q] RCU usage in infiniband
Date: Wed, 8 Jul 2026 11:23:16 +0200 [thread overview]
Message-ID: <20260708092316.Qb39F_B0@linutronix.de> (raw)
Hi,
I've been randomly starting at infiniband code and noticed it uses
call_rcu() with a callback from its module.
| drivers/infiniband/hw/mlx5/devx.c: call_rcu(&event_sub->rcu, devx_free_subscription);
| drivers/infiniband/ulp/ipoib/ipoib_main.c: call_rcu(&neigh->rcu, ipoib_neigh_reclaim);
I don't see synchronize_rcu() and rcu_barrier() there so I've been
asking myself what ensures that the callback completes before module is
gone (via rmmod)? I would expect a rcu_barrier() in
ipoib_cleanup_module() for instance.
Is the unload path so "late" that the callbacks run before the module is
unmapped or is there something between the APIs that ensures this?
Sebastian
next reply other threads:[~2026-07-08 9:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 9:23 Sebastian Andrzej Siewior [this message]
2026-07-08 13:17 ` [Q] RCU usage in infiniband Jason Gunthorpe
2026-07-08 13:21 ` Sebastian Andrzej Siewior
2026-07-08 13:28 ` Jason Gunthorpe
2026-07-08 13:34 ` Sebastian Andrzej Siewior
2026-07-08 13:58 ` Paul E. McKenney
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=20260708092316.Qb39F_B0@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=jgg@nvidia.com \
--cc=leonro@nvidia.com \
--cc=linux-rdma@vger.kernel.org \
--cc=paulmck@kernel.org \
--cc=petr.pavlu@suse.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