Re: [lttng-dev] [PATCH 00/11] Add support for TSAN to liburcu

Olivier Dion via lttng-dev <[email protected]>
Newsgroups org.lttng.lists.lttng-dev
Organization EfficiOS
Message-ID <87a5xr15ui.fsf@laura>
On Wed, 24 May 2023, Dmitry Vyukov <[email protected]> wrote:
> On Tue, 23 May 2023 at 18:05, Olivier Dion <[email protected]> wrote:

> I don't this this is true in the C/C++ memory model:
> "the preceding atomic exchange with sequential consistency already
> acts as an implicit release (in term of memory barrier) for the
> following store".
>
> std::atomic_thread_fence does affect all preceding/subsequent
> operations, but an atomic memory operation only affects ordering on
> that variable, it doesn't also serve as a standalone memory fence.

After reading the standard, we concur with you.  We had to revisit the
memory model used by URCU to understand the conflict.  While doing so,
we had to adapt some of the algorithms that were assuming implicit full
memory barriers with operation such as CAS.

Thank for the insight!

-- 
Olivier Dion
EfficiOS Inc.
https://www.efficios.com
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.