RFR: JDK-8260332: ParallelGC: Cooperative pretouch for oldgen expansion [v2]

Kim Barrett kbarrett at openjdk.java.net
Mon Mar 15 02:16:10 UTC 2021


On Sun, 14 Mar 2021 21:29:59 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Amit Pawar has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fixed build issues for some targets and updated with suggested changes.
>
> src/hotspot/share/gc/shared/pretouchTask.cpp line 94:
> 
>> 92: 
>> 93:   if (thread_num == 0) {
>> 94:     Atomic::release_store(&_cur_addr, _end_addr);
> 
> The release is unnecessary given the Atomic::sub.

Besides what David said, I think this is also confusing.  I think it's to account for the claim (using fetch_and_add) unconditionally adding the chunk size to cur_addr, which could lead to overshoot.  I think it would be clearer to prevent the overshoot from occurring.

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

PR: https://git.openjdk.java.net/jdk/pull/2976


More information about the hotspot-dev mailing list