RFR: 8310031: Parallel: Implement better work distribution for large object arrays in old gen [v3]

Richard Reingruber rrich at openjdk.org
Mon Sep 11 15:51:43 UTC 2023


On Thu, 3 Aug 2023 11:46:45 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> Richard Reingruber has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Limit effect of previous commit to large array handling
>
> src/hotspot/share/gc/parallel/psCardTable.cpp line 257:
> 
>> 255:                                                space_top);
>> 256: 
>> 257:     // Process a stripe iff it contains any obj-start or large array chunk
> 
> Suggestion:
> 
>     // Stripes without an object start may either contain a large object, or a part of a large objArray; the latter must be handled specially, the former is handled by the owner of the stripe where that large object starts.
> 
> I think the original comment referred to the not-taken path of the next `if`; sind the taken path now also potentially processes an object (looking for a part of a large objArray) I reformulated it.

I overlooked that the suggested comment needs line breaks.

Also I think that the long comment before `PSCardTable::scavenge_contents_parallel` fails to explain which thread has to scan which object: objects starting in a stripe are scanned completely by the thread owning the stripe even if they extend beyond it. Worker threads skip over objects not starting in their stripe. With that the comment at line 257 can be kept shorter.

I'll come up with a suggestion.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14846#discussion_r1321753008


More information about the hotspot-gc-dev mailing list