[jmm-dev] bitwise RMW operators, specifically testAndSetBit/BTS

Hans Boehm boehm at acm.org
Fri Jul 22 22:07:03 UTC 2016

On Fri, Jul 22, 2016 at 4:11 AM, Doug Lea <dl at cs.oswego.edu> wrote:
> On 07/21/2016 10:57 PM, John Rose wrote:
>> Putting aside the history and esthetics of terms, the big question
>> here is whether to remove the exception for 64 bit types in
>> 17.7 (Non-atomic Treatment of double and long), and mandate
>> that all primitive types are atomic, including non-volatile longs
>> and doubles.
> (This was in the initial issues list for JMM revision, and like
> every other issue, refuses to go away all by itself :-)
>> Is it time to do that yet, or is there some 32-bit JVM out there
>> that will fall over if it has to do the volatile dance even on
>> non-volatile types?
>> I'm going to guess that there still *ARE* such JVMs out there,
>> but their number is decreasing exponentially over time.
>> Eventually we can do this.
>> Argument to keep things as they are:  64-bit non-atomicity
>> (aka struct tearing) is just a precursor to non-atomicity of 128-bit
>> and larger value types.  It's a permanent feature on our landscape,
>> so don't fight it.
> Right. I think that this where we last left this.

The other argument that we missed last time is there are MIPS variants for
which atomicity of 64-bit types is expensive.  The same applies to 32 bit
ARM with the "large physical address extension".  I don't think these
constitute a large fraction of the interesting devices anymore, but I also
suspect there are still way too many of them to be ignored.

More information about the jmm-dev mailing list