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

JNI Get/ReleasePrimitiveArrayCritical don't scale

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • hs23
    • hs23
    • 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

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

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: