Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8241845

Shenandoah: align ShenandoahHeapRegions to cache lines

XMLWordPrintable

    • gc
    • b18

        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.

              shade Aleksey Shipilev
              shade Aleksey Shipilev
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: