RFR: 8329223: Parallel: Parallel GC resizes heap even if -Xms = -Xmx [v7]

Albert Mingkun Yang ayang at openjdk.org
Tue Apr 23 07:53:33 UTC 2024


On Mon, 22 Apr 2024 14:28:06 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:

>> Maybe my prev msg was misleading... Reprint the code-snippet:
>> 
>> 
>>     if (initial_old_size > MaxOldSize) {
>>       log_warning(gc, ergo)(...);
>>       initial_old_size = MaxOldSize;
>>     } else if (initial_old_size < MinOldSize) {
>>       log_waring(gc, ergo)(...);
>>       initial_old_size = MinOldSize;
>>     }
>> 
>> so that the two assignment to `initial_old_size` matches up, accounting for over/under flow.
>
> Sorry, my typo in above comment. I did set `initial_old_size = MinOldSize`.
> 
> 
> @@ -308,7 +308,7 @@ void GenArguments::initialize_size_info() {
>        initial_old_size = MaxOldSize;
>      } else if (initial_old_size < MinOldSize) {
>        log_warning(gc, ergo)("Inconsistency between initial old size and minimum old size");
> -      MinOldSize = initial_old_size;
> +      initial_old_size = MinOldSize;
>      }
>    }

I see. Could you explain a bit more on what causes the failure? (It's not obvious to me why some combination of initial_old_size/MinOldSize can trigger `pthread_mutex_destroy(&mutex_)failed`.)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18539#discussion_r1575806699


More information about the hotspot-gc-dev mailing list