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

Shenandoah: should not use parallel reference processing with single GC thread

    XMLWordPrintable

Details

    • gc
    • b19

    Backports

      Description

        Current code does:

        void ShenandoahHeap::ref_processing_init() {
          assert(_max_workers > 0, "Sanity");

          _ref_processor =
            new ReferenceProcessor(&_subject_to_discovery, // is_subject_to_discovery
                                   ParallelRefProcEnabled, // MT processing
                                   _max_workers, // Degree of MT processing
                                   true, // MT discovery
                                   _max_workers, // Degree of MT discovery
                                   false, // Reference discovery is not atomic
                                   NULL, // No closure, should be installed before use
                                   true); // Scale worker threads

          shenandoah_assert_rp_isalive_not_installed();
        }

        ...and:

          if (FLAG_IS_DEFAULT(ParallelRefProcEnabled)) {
            FLAG_SET_DEFAULT(ParallelRefProcEnabled, true);
          }

        ...so it always runs with parallel reference processing, even when -XX:ParallelGCThreads=1. This probably penalizes the single-threaded containers. Shenandoah should use single-threaded RP when that happens. Look for a relevant block in G1 code.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved: