RFR: 8354560: Exponentially delay subsequent native thread creation in case of EAGAIN [v5]

David Holmes dholmes at openjdk.org
Thu May 8 23:04:50 UTC 2025


On Thu, 8 May 2025 22:59:51 GMT, Yannik Stradmann <duke at openjdk.org> wrote:

>> This change introduces an exponential backoff when hitting `EAGAIN` during native thread creation in hotspot.
>> 
>> In contrast to the current solution, where we retry to create a native thread up to three times in a tight loop, hotspot will will thereby be more kind to an already depleted resource, reduce stress on the kernel and become more robust on systems under high load.
>> 
>> The proposed modifications to `os_linux.cpp` have substantially improved system stability in a mid-sized Jenkins cluster and have been in production within our systems over the past three years. I have verbatim ported these to the other platforms, which previously also relied on identical logic.
>
> Yannik Stradmann has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Remove restrictive scopes

Thanks for updates. That seems fine to me. You still need a second reviewer for hotspot changes.

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

Marked as reviewed by dholmes (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/24682#pullrequestreview-2826563771


More information about the hotspot-runtime-dev mailing list