From: Leon Romanovsky <leon@kernel.org>
To: Timothy Day <timday@thelustrecollective.com>
Cc: Michael Margolin <mrgolin@amazon.com>,
Jason Gunthorpe <jgg@nvidia.com>,
linux-rdma@vger.kernel.org, Gal Pressman <gal.pressman@linux.dev>,
Yossi Leybovich <sleybo@amazon.com>,
Marco Elver <elver@google.com>
Subject: Re: [PATCH v1 0/5] Support Clang context analysis for RDMA/efa
Date: Wed, 22 Jul 2026 10:21:56 +0300 [thread overview]
Message-ID: <20260722072156.GT110966@unreal> (raw)
In-Reply-To: <20260721202734.29592-1-timday@thelustrecollective.com>
On Tue, Jul 21, 2026 at 04:27:33PM -0400, Timothy Day wrote:
> On Tue, 21 Jul 2026 14:10:30 +0300, Leon Romanovsky wrote:
> > On Thu, Jul 16, 2026 at 11:16:53PM -0400, Timothy Day wrote:
> > > Hi,
> > >
> > > This series adds annotations for Clang's context analysis to the
> > > RDMA/efa driver.
> > >
> > > Clang context analysis was recently added in a series by Marco
> > > Elver [1]. This allows the compiler to validate different
> > > locking patterns at compile time. This series enables context
> > > analysis and adds new annotations.
> > >
> > > The series was built with Clang 23 (since the minimum Clang
> > > version for this feature was recently bumped to 23 in 7.2+ [2])
> > > with CONFIG_WARN_CONTEXT_ANALYSIS enabled. I based this series
> > > on rdma/for-next.
> > >
> > > I'd appreciate reviews and suggestions. I'm especially interested
> > > in suggestions on how we can make this easier to enable in other
> > > parts of the rdma subsystem.
> >
> > Yes, this is precisely why I'm not rushing to apply it. It would
> > be far more compelling to first apply this context analysis to
> > drivers/infiniband/core, so we can evaluate both its benefits and
> > drawbacks.
>
> That's fair - the context analysis work is still pretty new. There
> are some examples in other subsystems. I submitted a series to
> convert ext2 [1]. And there's some on-going work in the block layer
> to enable this for nvme and other drivers [2].
>
> > On the other hand, converting drivers incrementally is the safer
> > approach.
>
> The annotations should be a no-op without CONFIG_WARN_CONTEXT_ANALYSIS
> enabled.
>
> Generally, I'm looking for false positives/negatives in the
> analysis and opportunities to create helper functions/macros
> to reduce the amount of manual annotation required. I started
> with smaller drivers to hopefully reduce the amount of churn
> required for larger components. Also, core code tends to have
> more complex locking patterns.
>
> But I can prepare a series for core/, if there's interest
> in reviewing it. We can also hold off a bit if you want to
> wait for more adoption in other subsystems.
We can try with core patches first.
Thanks
>
> Tim Day
>
> [1] https://lore.kernel.org/linux-fsdevel/20260712165610.366474-1-timday@thelustrecollective.com/
> [2] https://lore.kernel.org/all/20260706141452.3008233-1-nilay@linux.ibm.com/
prev parent reply other threads:[~2026-07-22 7:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-17 3:16 [PATCH v1 0/5] Support Clang context analysis for RDMA/efa Timothy Day
2026-07-17 3:16 ` [PATCH v1 1/5] RDMA/efa: mark mmio_read seq_num as guarded by mmio_read lock Timothy Day
2026-07-17 3:16 ` [PATCH v1 2/5] RDMA/efa: mark comp_ctx_pool* as guarded by comp_ctx_lock Timothy Day
2026-07-17 3:16 ` [PATCH v1 3/5] RDMA/efa: mark admin CQ consumer state as guarded by the ACQ lock Timothy Day
2026-07-17 3:16 ` [PATCH v1 4/5] RDMA/efa: mark admin SQ producer state as guarded by the ASQ lock Timothy Day
2026-07-17 3:16 ` [PATCH v1 5/5] RDMA/efa: enable context analysis support for efa driver Timothy Day
2026-07-21 11:10 ` [PATCH v1 0/5] Support Clang context analysis for RDMA/efa Leon Romanovsky
2026-07-21 20:27 ` Timothy Day
2026-07-22 7:21 ` Leon Romanovsky [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=20260722072156.GT110966@unreal \
--to=leon@kernel.org \
--cc=elver@google.com \
--cc=gal.pressman@linux.dev \
--cc=jgg@nvidia.com \
--cc=linux-rdma@vger.kernel.org \
--cc=mrgolin@amazon.com \
--cc=sleybo@amazon.com \
--cc=timday@thelustrecollective.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.