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

Shenandoah: reconsider update references memory ordering

XMLWordPrintable

    • gc
    • b04

        Shenandoah update heap references code uses default Atomic::cmpxchg to avoid races with mutator updates. Hotspot's default for atomic operations is memory_order_conservative, which emits two-way memory fences around the CASes at least on AArch64 and PPC64.

        This seems to be excessive for Shenandoah update references code, and "relaxed" is enough. We do not seem to piggyback on update-references memory effects anywhere (in fact, if not for mutator, we would not even need a CAS).

        It would not help AArch64 much until JDK-8261579 actually implements weaker semantics.

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

                Created:
                Updated:
                Resolved: