RFR(M): 8202080: Introduce ordering semantics for Atomic::add and other RMW atomics
Doerr, Martin
martin.doerr at sap.com
Thu Apr 26 14:23:52 UTC 2018
Hi,
I have renamed "cmpxchg_memory_order" to "atomic_memory_order" and added support to all Read-Modify-Write atomics with support for all C++11 semantics except seq_cst. The latter has issues on PPC64 so we're currently using our own memory_order_conservative instead, which is the default.
Please review my new webrev:
http://cr.openjdk.java.net/~mdoerr/8202080_atomic_add/webrev.01/
We'll test Windows, MacOS, linux x86+ppc64+s390, AIX and Solaris SPARC.
It'd be great if somebody could check arm/aarch64 and zero.
This change may enable optimizations for arm/aarch64 (not yet included).
Best regards,
Martin
-----Original Message-----
From: Doerr, Martin
Sent: Donnerstag, 26. April 2018 11:20
To: 'David Holmes' <david.holmes at oracle.com>; Erik Ă–sterlund <erik.osterlund at oracle.com>; hotspot-runtime-dev at openjdk.java.net; Aleksey Shipilev <shade at redhat.com>; Lindenmaier, Goetz <goetz.lindenmaier at sap.com>; Michihiro Horie (HORIE at jp.ibm.com) <HORIE at jp.ibm.com>
Subject: RE: RFR(M): 8202080: Introduce ordering semantics for Atomic::add
Hi David,
sounds like we are on the same page, now. I think we should have some kind of summary of what was analyzed. But that belongs to the other thread (JDK- 8154736).
> The bugs in this kind of code are very subtle and rarely exposed through normal levels of testing.
Right. We have experienced this often enough. So it is definitely in our interest to have correct memory barriers. Mistakes will hit us (PPC64). So I appreciate that you insist on careful analysis.
I'll prepare a new webrev with conservative semantics for all read-modify-write atomics by default.
Best regards,
Martin
More information about the hotspot-runtime-dev
mailing list