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

Amit Pawar github.com+71302734+amitdpawar at openjdk.java.net
Tue Mar 16 07:22:08 UTC 2021


On Mon, 15 Mar 2021 01:46:08 GMT, Kim Barrett <kbarrett 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/parallel/psOldGen.hpp line 49:
> 
>> 47:   PSGenerationCounters*    _gen_counters;
>> 48:   SpaceCounters*           _space_counters;
>> 49:   PretouchTask*            _pretouch;          // Used when old gen resized during scavenging.
> 
> I think abusing PretouchTask in this way, completely outside the workgang protocol, is confusing and shouldn't be done.  There might be some code that could be shared between this use and PretouchTask, but if so then it should be factored out for such sharing, rather than mangling PretouchTask in the way being proposed.

Thanks for your suggestion. It will be better if you can give some direction as G1GC also need similar fix during the expansion. I think G1 has array of regions to be touched during the expansion and that task needs to be shared across the threads. pretouch class can be put inside another class and that can be shared across the threads to synchronize the pretouch task and not sure whether that will be OK again. I explored this approach after your suggestion and thought to update after the feedback during the review process. Please suggest.

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

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


More information about the hotspot-dev mailing list