qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/2] atomics: do not use __atomic primitives for


From: Emilio G. Cota
Subject: Re: [Qemu-devel] [PATCH 1/2] atomics: do not use __atomic primitives for RCU atomics
Date: Tue, 24 May 2016 15:56:09 -0400
User-agent: Mutt/1.5.23 (2014-03-12)

On Tue, May 24, 2016 at 09:08:01 +0200, Paolo Bonzini wrote:
> On 23/05/2016 19:09, Emilio G. Cota wrote:
> > PS. And really equating smp_wmb/rmb to release/acquire as we have under
> > #ifdef __ATOMIC is hard to justify, other than to please tsan.
> 
> That only makes a difference on arm64, right?
> 
>       acquire         release         rmb             wmb
> x86   --              --              --              --
> power lwsync          lwsync          lwsync          lwsync
> armv7 dmb             dmb             dmb             dmb
> arm64 dmb ishld       dmb ish         dmb ishld       dmb ishst
> ia64  --              --              --              --

Yes. I now see why we're defining rmb/wmb based on acquire/release:
it's quite convenient given that the compiler provides them, and
the (tiny) differences in practice are not worth the trouble of
adding asm for them. So I take back my comment =)

The gains of getting rid of the consume barrier from atomic_rcu_read
are clear though; updated patch to follow.

Thanks,

                Emilio



reply via email to

[Prev in Thread] Current Thread [Next in Thread]