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

Some options related to RTM locking optimization works inconsistently

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8u20, 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b10
    • CPU:
      x86

      Backports

        Description

        (description was updated)

        Several issues with abort handling on lock busy for stack locks:

        If we use xabort on lock busy for stack locks, then we jump to inflated locking
        before any xbegin call.
        However, when +RTMXendForLockBusy is used, we're starting transaction
        in stack locking code, detects that lock is inflated, interrupt transaction with
        xend call and then jumps to inflated locking.

        We should jump to inflated locking without starting a new transaction
        regardless to RTMXendForLockBusy value.

        Also, in case of xend for lock busy, when we jump to inflated locking on
        lock busy, we start counting retries from RTMRetryCount, but IMO we should
        start from (RTMRetryCount-1): first attempt was done in stack locking code.

        If we jump to inflated locking immediately, then this issue will be resolved.

        ILW (M = we do one extra transaction when it is not needed, M = issue could be reproduced with non-default values of options, H = there is no workaround if we want to use RTM locking for stack locks and xend for lock busy) => P3.

        See comments for example.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  kvn Vladimir Kozlov
                  Reporter:
                  fzhinkin Filipp Zhinkin
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: