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

Improve G1 Service thread task scheduling to guarantee task delay

    XMLWordPrintable

Details

    • gc
    • b27

    Description

      Currently when looking if a task should run or not the time difference will be rounded down to nearest millisecond. This becomes a problem if a task tries to reschedule itself in 1 ms and expects to not be run instantly. Since the rescheduling tasks place before the check for what tasks are ready to run, the time passed in between will be enough to cause the 1ms delay to have become ~900us and then it will be rounded down to 0ms.

      To guarantee that the task is delayed at least the requested amount of time we need to make sure that the time difference is rounded up. This can be achieved by adding some new TimeHelper functions doing the ceiling.

      Attachments

        Issue Links

          Activity

            People

              ayang Albert Yang
              sjohanss Stefan Johansson
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: