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

os::is_server_class_machine() could return incorrect result if a host's cpu have a few logical cores

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P5
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b107
    • CPU:
      x86

      Description

      os::is_server_class_machine() could return incorrect result if a host's cpu have a few logical cores.
      For example if a host has 2 physical cores with 2 threads on each this host is not considered as server class machine despite https://docs.oracle.com/javase/8/docs/technotes/guides/vm/gctuning/ergonomics.html#sthref5 says:
      "2 or more physical processors."

      The code :
          const unsigned int logical_processors =
            VM_Version::logical_processors_per_package();
          if (logical_processors > 1) {
            const unsigned int physical_packages =
              os::active_processor_count() / logical_processors;
            if (physical_packages > server_processors) {
              result = true;
            }
        the line "if (physical_packages > server_processors)" should be "if (physical_packages >= server_processors)" to comply with description.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kzhaldyb Kirill Zhaldybin (Inactive)
              Reporter:
              kzhaldyb Kirill Zhaldybin (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: