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

Some options related to RTM locking optimization works inconsistently

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 8u20, 9
    • hotspot
    • b10
    • x86

        (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.

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

                Created:
                Updated:
                Resolved: