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

JDK-8201487 disabled too much queue balancing

    Details

    • Subcomponent:
      gc
    • Resolved In Build:
      b17
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        JDK-8201487 changed process_discovered_reflist's test for whether to call balance_queues. The old test was

          if ((mt_processing && ParallelRefProcBalancingEnabled) ||
              _discovery_is_mt)

        The new test is

          if (mt_processing && ParallelRefProcBalancingEnabled)

        The old test balanced unnecessarily when !mt_processing (if _discovery_is_mt), which was the point of JDK-8201487. However, the new test doesn't balance in some cases where it is necessary for correctness. Specifically, if

        (1) mt_processing is true
        (2) ParallelRefProcBalancingEnabled is false (not the default)

        and either
        (3) _discovery_is_mt is true and the number of processing threads < the number of discovery threads
        or
        (4) _discovery_is_mt is false and the number of processing threads < the maximum number of queues

        then balancing is required but will not be performed. It is required because there are discovery queues that won't be dealt with by any processing thread. The ! _discovery_is_mt case is because discovery is done round robin style among the queues.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  kbarrett Kim Barrett
                  Reporter:
                  kbarrett Kim Barrett
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: