[jdk21u-dev] RFR: 8340547: Starting many threads can delay safepoints [v3]

Oli Gillespie ogillespie at openjdk.org
Fri Aug 1 16:14:22 UTC 2025


On Fri, 1 Aug 2025 16:08:06 GMT, Sergey Nazarkin <snazarki at openjdk.org> wrote:

>> I'd like to backport this fix to fix the issue with starting a lot of threads in a burst. Some users found this to be a barrier to migrating from JDK8. 
>> 
>> The backport is not clean as required to adjust `globals.hpp` and replace `ConditionalMutexLocker` with classic `MutexLocker`. Original fix and discussion are [here](https://github.com/openjdk/jdk/pull/21111)
>> 
>> Tested with `tier1` and reproducers from [JDK-8340547](https://bugs.openjdk.org/browse/JDK-8340547), [JDK-8307970](https://bugs.openjdk.org/browse/JDK-8307970)
>
> Sergey Nazarkin has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits:
> 
>  - Merge branch 'master' of https://git.openjdk.org/jdk21u-dev into JDK-8340547_backport
>  - NULL -> nullptr
>  - Fix absence of ConditionalMutexLocker
>  - Backport e704c055a4cf2aab77cc2b3d034f5a8b8d9e3331

src/hotspot/share/runtime/globals.hpp line 1996:

> 1994:           "Use an extra lock during Thread start and exit to alleviate"     \
> 1995:           "contention on Threads_lock.")                                    \
> 1996:   product(bool, UseSecondarySupersCache, true, DIAGNOSTIC,                  \

The merge has messed with the spacing here.

-------------

PR Review Comment: https://git.openjdk.org/jdk21u-dev/pull/1365#discussion_r2248352553


More information about the jdk-updates-dev mailing list