[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: |
Alex Bennée |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] atomics: do not use __atomic primitives for RCU atomics |
Date: |
Wed, 25 May 2016 09:52:41 +0100 |
User-agent: |
mu4e 0.9.17; emacs 25.0.94.3 |
Sergey Fedorov <address@hidden> writes:
> On 24/05/16 22:56, Emilio G. Cota wrote:
>> 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.
>
> However, maybe it's not such a pain to maintain an optimized version for
> AArch64 in assembly :P
Please don't. The advantage of the builtins is they are known by things
like tsan.
>
> Best,
> Sergey
--
Alex Bennée
- [Qemu-devel] [PATCH 1/2] atomics: do not use __atomic primitives for RCU atomics, (continued)
- [Qemu-devel] [PATCH 1/2] atomics: do not use __atomic primitives for RCU atomics, Emilio G. Cota, 2016/05/21
- Re: [Qemu-devel] [PATCH 1/2] atomics: do not use __atomic primitives for RCU atomics, Alex Bennée, 2016/05/22
- Re: [Qemu-devel] [PATCH 1/2] atomics: do not use __atomic primitives for RCU atomics, Paolo Bonzini, 2016/05/23
- Re: [Qemu-devel] [PATCH 1/2] atomics: do not use __atomic primitives for RCU atomics, Richard Henderson, 2016/05/23
- Re: [Qemu-devel] [PATCH 1/2] atomics: do not use __atomic primitives for RCU atomics, Emilio G. Cota, 2016/05/23
- Re: [Qemu-devel] [PATCH 1/2] atomics: do not use __atomic primitives for RCU atomics, Paolo Bonzini, 2016/05/24
- Re: [Qemu-devel] [PATCH 1/2] atomics: do not use __atomic primitives for RCU atomics, Emilio G. Cota, 2016/05/24
- Re: [Qemu-devel] [PATCH 1/2] atomics: do not use __atomic primitives for RCU atomics, Sergey Fedorov, 2016/05/24
- Re: [Qemu-devel] [PATCH 1/2] atomics: do not use __atomic primitives for RCU atomics,
Alex Bennée <=
- Re: [Qemu-devel] [PATCH 1/2] atomics: do not use __atomic primitives for RCU atomics, Sergey Fedorov, 2016/05/25
[Qemu-devel] [PATCH 2/2] docs/atomics: update atomic_read/set comparison with Linux, Emilio G. Cota, 2016/05/21