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

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P5 P5
    • 9
    • 9
    • hotspot
    • None
    • b107
    • x86

      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.

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

              Created:
              Updated:
              Resolved: