RFR: 8306738: Select num workers for safepoint ParallelCleanupTask [v3]
Axel Boldt-Christmas
aboldtch at openjdk.org
Mon May 8 09:03:24 UTC 2023
On Mon, 8 May 2023 08:50:25 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> I prefer using a boolean return value as well. I just had trouble with coming up with a non confusing name for the method. Maybe `needs_safepoint_rehash_table` is good enough.
>>
>> I'll rewrite the condition with multiple ifs.
>>
>> My knowledge of the concurrent hash table is rather limited, but what does the `Should and can do alt-rehashing` comment mean? AFAIK the `_local_table->is_safepoint_safe()` check is just to see if someone is currently resizing the table when we entered the safepoint.
>
> Maybe "Should and can do alt-rehashing" is too strong indeed. "Need and can do rehashing" is more neutral here, and matches what code is actually checking.
I see now, you are describing the negation. `!(!_needs_rehashing || !_local_table->is_safepoint_safe())`
Confused me as the other comments described the condition.
I think I'll rewrite the comment to be more in the same style as the ones above.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13616#discussion_r1187204479
More information about the hotspot-runtime-dev
mailing list