RFR: 8314972: GenShen: promote_in_place needs to prepare remembered set before it enables old allocations within region [v2]

Y. Srinivas Ramakrishna ysr at openjdk.org
Sun Aug 27 05:27:37 UTC 2023


On Fri, 25 Aug 2023 17:28:29 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

>> May be modify the comment to state something like:
>> // Clear any obsolete object start information; we'll register the live objects in the loop below,
>> // as well as registering and stamping free block fillers over dead objects.
>> // We also dirty the card table for the entire allocated range; it'll be updated/refined when we
>> // scan it next time for young pointers.
>
> We don't clear object registrations when an old region is freed because often times, the free region may next be put into service as a young-region, where the object registrations are "don't care" values.  I'll make the adjustment to the comment.

In any run, the number of clearings is basically the number old region births if cleared at promotion or allocation of an old generation, or deaths if cleared at freeing of an old generation. In a non-terminating run,  the rate of births equals rate of deaths. So the difference is just _when_ we clear, not how much. The amount of clearing work in the long run is no different in either case. So the difference is cache pollution, mutator latency, and code maintenance. I'm guessing there's really no difference, since it all happens on concurrent GC threads. So code maintenance would probably trump everything, and thinking some more about it, I am guessing there's not much difference in that either in when the clearing is done.

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

PR Review Comment: https://git.openjdk.org/shenandoah/pull/310#discussion_r1306601922


More information about the shenandoah-dev mailing list