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

Deprecate and then obsolete the DontYieldALot flag

    XMLWordPrintable

Details

    • b21

    Description

      The DontYieldALot flag was introduced way back in Java 1.0 to address scheduling anomalies on Solaris sparc. Due to uncertainly around scheduling and preemption (ref original "co-operative" "green threads") Java libraries would insert `Thread.yield` calls in numerous places to try to be "good citizens". With the thread scheduling model used by Hotspot on Solaris these yield calls were not only unnecessary but became a detriment to performance. To mitigate this "yield throttling" was put in place using the DontYieldALot product flag and the develop flag `DontYieldALotInterval`. If DontYieldALot was true then yields would become no-ops unless it had been `DontYieldALotInterval` milliseconds since the last real yield. The `DontYieldALot` flag was only set true on Solaris.

      Skip forward 25 years and the library code relies on preemptive scheduling and doesn't use yield very much. We no longer support Solaris and so the flag is always false. It is time to deprecate the flag and then remove (obsolete) it.

      Attachments

        Issue Links

          Activity

            People

              dholmes David Holmes
              dholmes David Holmes
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: