RFR (S): JEP-142: Reduce Cache Contention on Specified Fields

Aleksey Shipilev aleksey.shipilev at oracle.com
Tue Nov 27 05:59:14 PST 2012

On 11/27/2012 05:52 PM, Jesper Wilhelmsson wrote:
> Annotated fields and classes will be padded and require more memory.
> What would be the optimal behavior in an out of memory situation? Should
> the GC try to remove the padding to keep OOME away, or should we just
> accept that these objects are now larger and we are out of memory.

No can do. That means repackaging the field in existing classes forced
by GC; this is impossible unless JEP-159 is here.

> Also, the current design adds twice the size of a normal cache line, one
> potential improvement could be to make sure that allocation and GC are
> aware of these padded fields and always place them at the start of a
> cache line and only pads as much as needed to fill the rest of the cache
> line. 

Yes, that was the inclination we are considering. We are padding in both
directions because we miss the GC interop at this point. This can be
added non-disruptively after the fact.


More information about the hotspot-dev mailing list