RFR: 8305896: Alternative full GC forwarding [v16]

Roman Kennke rkennke at openjdk.org
Tue May 2 15:33:24 UTC 2023


On Tue, 2 May 2023 15:11:59 GMT, Erik Österlund <eosterlund at openjdk.org> wrote:

>> Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Address @shipilev's review
>
> src/hotspot/share/gc/shared/preservedMarks.cpp line 52:
> 
>> 50:     if (GCForwarding::is_forwarded(obj)) {
>> 51:       elem->set_oop(GCForwarding::forwardee(obj));
>> 52:     }
> 
> Is PreservedMarks still useful after moving the spacious forwarding/mark information out from the markWord? I can see that we need it while transitioning to using your new code, but that's about it right?

It is still useful. This PR implements a compression that allows to use only the lowest 32bit of the mark-word for the forwarding pointer, but it still essentially uses the mark-word to store that information. That means that it overrides i-hash-code and lock-bits just the same as the normal implementation, and thus must preserve this information.
I *also* prototyped a hash-table-based forwarding which does no longer use the mark-word to store forwarding. However, I found that to be 1. significantly slower and 2. significantly larger. That was a trade-off that I did not want to make at this point, when we 'only' want 64-bit-headers, simply because it's not yet necessary.
It *will* become necessary to make that trade-off, or come up with a better overall approach (e.g. use scissor-GC like Parallel GC does, or come up with a better fwd-table like in that paper that you sent me: https://dl.acm.org/doi/abs/10.1145/3546918.3546928) but this needs to be researched.
So yeah, the sliding forwarding algorithm is an interim solution but I think it is worth to have it at this point in time.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13582#discussion_r1182713491


More information about the shenandoah-dev mailing list