JDK-8035815 : Cache-align and pad the from card cache
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 8u20,9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-02-26
  • Updated: 2014-07-29
  • Resolved: 2014-03-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u20Fixed 9 b08Fixed
Related Reports
Relates :  
Description
The fast card cache is a very frequently accessed data structure.

It is basically a 2d array of per-region values (for every thread) that contain the recently card within that region that has been put into the remembered set.

This 2d array, nor its per-thread components are not aligned to cache lines or padded in any way to avoid false sharing.

Fix this.
Comments
Note that this change keeps using the additional indirection table from thread id to row. Measurements with a prototype that uses a single large 2d dense array (and calculating the offset using a row * row_stride + region_idx formula) did not show a particular performance difference. So the original implementation has been kept. With JDK-8034868 there is an easy way to do micro optimizations on that, as it moves the FromCardCache into a separate class. Changes would be very localized.
04-03-2014