For applying padding to atomic references, in order to reduce
cache contention. JEP 142 should reduce the need for this along
with the @Contended annotation, however that might have
security restrictions, the runtime might not act on it since it's
just a recommendation, plus it's nice to provide backwards
compatibility.
For applying padding to atomic references, in order to reduce cache contention. JEP 142 should reduce the need for this along with the
@Contended
annotation, however that might have security restrictions, the runtime might not act on it since it's just a recommendation, plus it's nice to provide backwards compatibility.See: http://mail.openjdk.java.net/pipermail/hotspot-dev/2012-November/007309.html
The default strategy is NoPadding. In order to apply padding:
PaddingStrategy.LeftRight256
PaddingStrategy.Right128
PaddingStrategy.Left128
PaddingStrategy.LeftRight128
PaddingStrategy.Right64
PaddingStrategy.Left64
PaddingStrategy.NoPadding