Re: [lttng-dev] [PATCH v2 05/12] urcu/uatomic: Add CMM memory model

"Paul E. McKenney via lttng-dev" <[email protected]>
Newsgroups org.lttng.lists.lttng-dev
Message-ID <5a440c51-43d3-4be6-ba5a-215c9d3e960f@paulmck-laptop>
On Thu, Jun 29, 2023 at 12:49:00PM -0400, Olivier Dion wrote:
> On Wed, 21 Jun 2023, "Paul E. McKenney" <[email protected]> wrote:
> > On Wed, Jun 07, 2023 at 02:53:52PM -0400, Olivier Dion wrote:
> >> -#ifdef __URCU_DEREFERENCE_USE_ATOMIC_CONSUME
> >> -# define _rcu_dereference(p) __extension__ ({						\
> >> -				__typeof__(__extension__ ({				\
> >> -					__typeof__(p) __attribute__((unused)) _________p0 = { 0 }; \
> >> -					_________p0;					\
> >> -				})) _________p1;					\
> >> -				__atomic_load(&(p), &_________p1, __ATOMIC_CONSUME);	\
> >
> > There is talk of getting rid of memory_order_consume.  But for the moment,
> > it is what there is.  Another alternative is to use a volatile load,
> > similar to old-style CMM_LOAD_SHARED() or in-kernel READ_ONCE().
> 
> I think we can stick to __ATOMIC_CONSUME for now.  Hopefully getting rid
> of it means it will be an alias for __ATOMIC_ACQUIRE for ever.

That seems emininently reasonable to me!

							Thanx, Paul
_______________________________________________
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.