JDK-8241845 : Shenandoah: align ShenandoahHeapRegions to cache lines
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 8-shenandoah,11-shenandoah,14,15
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-03-30
  • Updated: 2022-02-24
  • Resolved: 2020-03-31
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 14 JDK 15
14.0.2Fixed 15 b18Fixed
Related Reports
Blocks :  
Blocks :  
Relates :  
Description
Current ShenandoahHeapRegion definition has a trailing padding to isolate it from other regions. We can instead allocate every SHR at cache line boundary and then ditch the padding.

Assuming 64-byte cache lines in the following calculation. Current SHR takes 112 bytes in 64-bit mode and 64 bytes in 32-bit mode (after JDK-8241841). Adding trailing alignment ballons that to 176 and 128 bytes, respectively. Aligning to cache line size would make apparent SHR sizes to be 128 and 64 bytes, respectively. This saves 96...128K of native memory with the default number of regions, and more with more fine-grained regions with larger heaps.

Plus, we can allocate a large page for the entire storage at once.
Comments
Fix Request (14u) This improves Shenandoah performance and provides ground for future backports. Patch applies cleanly to 14u, passes hotspot_gc_shenandoah, tier{1,2,3} with Shenandoah enabled. The patch is fully contained in Shenandoah code.
30-04-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/f4e48777d978 User: shade Date: 2020-03-31 06:42:17 +0000
31-03-2020

RFR: https://mail.openjdk.java.net/pipermail/shenandoah-dev/2020-March/011815.html
30-03-2020