RFR: 8246718: ParallelGC should not check for forward objects for copy task queue
kim.barrett at oracle.com
Sun Jun 7 20:54:34 UTC 2020
> On Jun 7, 2020, at 6:25 AM, Thomas Schatzl <thomas.schatzl at oracle.com> wrote:
> On 07.06.20 07:08, Kim Barrett wrote:
>> Please review this change to the handling of copy tasks by ParallelGC.
>> Formerly, before adding a task entry to the queue it would check
>> whether the referenced object was already forwarded. If so, it would
>> handle the reference immediately, inline, rather than pushing the task
>> onto the queue.
>> Measurements show that a no-worse and sometimes better (depending on
>> the hardware configuration) approach for most applications is to not
>> do the forwarding check, but to instead prefetch the start of the
>> referenced object and then always push the task.
>> The corresponding G1 code does a for-write prefetch on the mark word
>> of the object, and a for-read prefetch past the object header.
>> Measurements with ParallelGC found the for-read prefetch not very
>> productive, and possibly even slightly counter-productive, so this
>> change only does the for-write prefetch on the mark word.
>> mach5 tier1-5
>> various performance tests
> looks good. Good find! :)
More information about the hotspot-gc-dev