Re: [PATCH RFC 03/33] locking: Introduce <linux/thread_safety.h>

From: Marco Elver
Date: Fri Feb 07 2025 - 03:30:19 EST


On Fri, 7 Feb 2025 at 04:53, Christoph Hellwig <hch@xxxxxx> wrote:
>
> > - a struct that represents a synchronization object is annotated with the
> > CAPABILITY() attribute,
> > - the operations on that synchronization object are annotated with the
> > ACQUIRE() and RELEASE() attributes,
> > - if variables or members that should be guarded by a synchronization
> > object are annotated with GUARDED_BY(),
>
> Those are all nasty shouting names, without and good prefixing.
>
> But more importantly ACQUIRE() and RELEASE() seems to duplicate the
> existing __acquires/__releases annotations from sparse. We really need
> to find away to unify them instead of duplicating the annotations.

This is exactly what my approach tries to do:
https://lore.kernel.org/all/20250206181711.1902989-1-elver@xxxxxxxxxx/T/#u
(Make it work with the existing keywords and extend them.)