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

JNI Get/ReleasePrimitiveArrayCritical don't scale

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: hs23
    • Fix Version/s: hs23
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
      gc
    • Resolved In Build:
      b13
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        JNI critical methods in Hotspot (such as GetPrimitiveArrayCritical, ReleasePrimitvieArrayCritical and so on) contain Atomic methods (inc, dec)
        to update shared variable _jni_lock_count. In case of frequent calls to these
        methods we observe true sharing problem. The attached draft patch skips
        grabbing the jni lock (and thus updating _jni_lock_count) unless a gc is
        needed and the thread isn't already in a critical section.

        See the preliminary results for a simple micro benchmarks in attach that check
        scalability on WSM EP (RHEL 5.5, V7B147):

        Threads 1 12 24

        Default hotspot 7244 9504 17540

        Patched hotspot 7408 81780 93819

        Patched / Default 1.02 8.61 5.25

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  never Tom Rodriguez
                  Reporter:
                  phh Paul Hohensee
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: