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

Yannik Stradmann duke at openjdk.org
Mon May 19 09:01:48 UTC 2025


On Mon, 19 May 2025 07:46:20 GMT, Fredrik Bredberg <fbredberg at openjdk.org> wrote:

>> Yannik Stradmann has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Remove restrictive scopes
>
> src/hotspot/os/aix/os_aix.cpp line 773:
> 
>> 771:       }
>> 772: 
>> 773:       if (trials_remaining-- <= 0) {
> 
> This if statement will break the loop after calling `pthread_create` four times, which is a bit confusing since `trials_remaining` was initialized to three.
> 
> If you want to keep the current behavior I'd prefer if you initialize `trials_remaining` to `4` and change the if statement to `if (--trials_remaining <= 0) {`
> 
> Don't forget to change all the other instances of this code in other platforms.

Thanks a lot for the review @fbredber!
I have updated the PR according to your suggestion.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24682#discussion_r2095214554


More information about the hotspot-runtime-dev mailing list