JNI Get/ReleasePrimitiveArrayCritical don't scale

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P3
    • hs23
    • Affects Version/s: hs23
    • Component/s: hotspot
    • None
    • gc
    • b13
    • generic
    • generic

        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

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

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: