RFR: 8186838: Generalize Atomic::inc/dec with templates

Erik Österlund erik.osterlund at oracle.com
Wed Sep 6 14:13:03 UTC 2017


Hi Andrew,

On 2017-09-06 15:20, Andrew Haley wrote:
> On 05/09/17 09:04, Erik Österlund wrote:
>
>> For example, our atomics typically conservatively guarantees
>> bidirectional full fencing, while theirs does not.
> Firstly, we can insert whatever fences we want, using intrinsics.  We
> don't need assembly language to do that.

Since I thought we already had (and finished) that discussion, and it is 
no longer relevant to the current proposal of removing inc/dec 
specializations, I hope you are okay with me preferring not to re-open 
that discussion in this RFE. Another day, perhaps?

> Secondly, I don't see bidirectional full fencing in x86 atomics, and I
> don't think we really want bidirectional full fencing anyway.

That is because an atomic x86 locked instruction is observably 
equivalent to having bidirectional fencing surrounding the access due to 
the stronger memory model of the machine.

Thanks,
/Erik


More information about the hotspot-dev mailing list