RFR: 8328986: Deprecate UseRTM* flags for removal
Vladimir Kozlov
kvn at openjdk.org
Tue Mar 26 18:27:24 UTC 2024
On Tue, 26 Mar 2024 17:53:08 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:
>> HotSpot supports RTM (restricted transactional memory) for locking since JDK 8 on Intel's processors ([JDK-8031320](https://bugs.openjdk.org/browse/JDK-8031320)). It was added to other platforms but has since been disabled and removed on all but Intel's processors. There was attempt to deprecate it ([JDK-8292082](https://bugs.openjdk.org/browse/JDK-8292082)) during JDK 20 development but at that time it was decided to keep it. Recently we discussed this with Intel and they agreed with RTM deprecation and removal from HotSpot.
>>
>> RTM adds complexity and maintenance burden to HotSpot locking code. It was never enabled by default because it only helped in some cases of heavy lock contention. We are not testing RTM feature since JDK 14 when we problem-list related tests: [JDK-8226899](https://bugs.openjdk.org/browse/JDK-8226899).
>>
>> New LIGHTWEIGHT locking implementation will not support RTM locking: [JDK-8320321](https://bugs.openjdk.org/browse/JDK-8320321).
>>
>> I propose to deprecate the related flags and remove the flags and all related code in a later release.
>>
>> Changes are based on @rkennke changes for JDK 20 [#9810](https://github.com/openjdk/jdk/pull/9810)
>>
>> Testing: tier1
>
> src/hotspot/share/runtime/arguments.cpp line 505:
>
>> 503: { "RegisterFinalizersAtInit", JDK_Version::jdk(22), JDK_Version::jdk(23), JDK_Version::jdk(24) },
>> 504: #if defined(X86)
>> 505: { "UseRTMLocking", JDK_Version::jdk(23), JDK_Version::jdk(24), JDK_Version::jdk(25) },
>
> Why do you include experimental options?
>
> Only `UseRTMLocking`, `UseRTMDeopt`, and `RTMRetryCount` are product.
>
>
> src/hotspot//cpu/x86/globals_x86.hpp: product(bool, UseRTMLocking, false, \
> src/hotspot//cpu/x86/globals_x86.hpp: product(bool, UseRTMForStackLocks, false, EXPERIMENTAL, \
> src/hotspot//cpu/x86/globals_x86.hpp: product(bool, UseRTMDeopt, false, \
> src/hotspot//cpu/x86/globals_x86.hpp: product(int, RTMRetryCount, 5, \
> src/hotspot//cpu/x86/globals_x86.hpp: product(int, RTMSpinLoopCount, 100, EXPERIMENTAL, \
> src/hotspot//cpu/x86/globals_x86.hpp: product(int, RTMAbortThreshold, 1000, EXPERIMENTAL, \
> src/hotspot//cpu/x86/globals_x86.hpp: product(int, RTMLockingThreshold, 10000, EXPERIMENTAL, \
> src/hotspot//cpu/x86/globals_x86.hpp: product(int, RTMAbortRatio, 50, EXPERIMENTAL, \
> src/hotspot//cpu/x86/globals_x86.hpp: product(int, RTMTotalCountIncrRate, 64, EXPERIMENTAL, \
> src/hotspot//cpu/x86/globals_x86.hpp: product(intx, RTMLockingCalculationDelay, 0, EXPERIMENTAL, \
> src/hotspot//cpu/x86/globals_x86.hpp: product(bool, UseRTMXendForLockBusy, true, EXPERIMENTAL, \
> src/hotspot//share/opto/c2_globals.hpp: product(bool, PrintPreciseRTMLockingStatistics, false, DIAGNOSTIC, \
I listed all RTM flags to get VM's deprecation message for all of them.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18478#discussion_r1539872281
More information about the hotspot-compiler-dev
mailing list