-
New Feature
-
Resolution: Fixed
-
P2
-
8u20
-
b08
-
x86
-
generic
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8038050 | 9 | Vladimir Kozlov | P2 | Resolved | Fixed | b08 |
JDK-8045298 | 8u25 | Vladimir Kozlov | P2 | Resolved | Fixed | b01 |
JDK-8053412 | emb-8u26 | Vladimir Kozlov | P2 | Resolved | Fixed | b17 |
RTM is useful for highly contended locks with low conflict in the critical region. The highly contended locks don't scale well otherwise but with RTM they show good scaling. RTM allows using coarse grain locking for applications. Also for lightly contended locks which are used by different threads RTM can reduce cache line ping pong and thereby show performance improvement.
Implementation:
---------------------
Generate RTM locking code for all inflated locks when "UseRTM" option is on with normal locking mechanism as fall back handler. On abort/lock busy the lock will be retried a fixed number of times under RTM as specified by "RTMRetryCount" option. The locks which abort too often can be auto tuned or manually tuned.
Auto-tuning can be done on an option like UseRTMDeopt and it will need abort ratio calculation for each lock. The abort ratio will be calculated after "RTMAbortThreshold" aborts are encountered.
On "UseRTMDeopt" if the aborts ratio reaches "RTMAbortRatio" the method containing the lock will be deoptimized and recompiled with all locks as normal locks. If the abort ratio continues to remain low after "RTMLockingThreshold" locks are attempted, then the method will be deoptimized and recompiled with all locks as RTM locks without abort ratio calculation code. The abort ratio calculation can be delayed by specifying the -XX:RTMLockingCalculationDelay in millisecond.
For manual tuning the abort statistics for each lock needs to be provided to the user on some JVM option like "PrintPreciseRTMLockingStatistics". Based on the abort statistics users can generate a .hotspot_compiler file and specify for which methods to disable RTM locking using "DoNotElide" option for that method.
Support for stack locks using RTM locking can be provided on similar lines on an option like "UseRTMForThinLocks".
- backported by
-
JDK-8038050 Use Intel RTM instructions for locks
-
- Resolved
-
-
JDK-8045298 Use Intel RTM instructions for locks
-
- Resolved
-
-
JDK-8053412 Use Intel RTM instructions for locks
-
- Resolved
-
- duplicates
-
JDK-6560083 -XX:+PrintPreciseBiasedLockingStatistics fails on amd64
-
- Closed
-
- is blocked by
-
JDK-8033805 Move Fast_Lock/Fast_Unlock code from .ad files to macroassembler
-
- Resolved
-
- relates to
-
JDK-8038181 Can't build product VM without precompiled header
-
- Resolved
-
-
JDK-8038286 nm->set_rtm_state() should be called after (nm != NULL) check
-
- Closed
-
-
JDK-8037860 Add tests to cover Intel RTM instructions support
-
- Resolved
-
-
JDK-8039496 Add sanity tests on RTM-related command line options
-
- Resolved
-
-
JDK-8328986 Deprecate UseRTM* flags for removal
-
- Resolved
-
-
JDK-8054376 Move RTM flags from Experimental to Product
-
- Closed
-
-
JDK-8038939 Some options related to RTM locking optimization works inconsistently
-
- Resolved
-
-
JDK-8020860 cluster Hashtable field updates for better transactional memory behaviour
-
- Resolved
-