RFR: 8352185: Shenandoah: Invalid logic for remembered set verification [v11]

Y. Srinivas Ramakrishna ysr at openjdk.org
Thu Mar 20 22:21:10 UTC 2025


On Tue, 18 Mar 2025 23:48:53 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

>> Thanks for for explanation, I have been reading and trying the understand how the remembered set works in GenShen. I wasn't sure whether this is actually right.
>> 
>> In generational mode, if the GC cycle is global, the read table is already cleaned during reset phase, so remembered set verification from `verify_before_concmark` and `verify_before_update_refs` shouldn't work properly, I think the remembered set verification before mark and update references should be disabled, what do you think? Meanwhile, there is no need to clean read table during global cycle in generational mode.
>
> Ok.  So we will always swap card tables, but we'll do it after verify-before-mark.  To clarify the intention, after we swap card table, the write-table is all clean, and the read table holds whatever had been gathered prior to the start of GC.  Young and bootstrap collection will update the write card table as a side effect of remembered set scanning.  Global collection will update the card table as a side effect of global marking of old objects.

I'd leave a comment to this effect (along the lines of Kelvin's last comment) here. Did we measure the impact of this change on performance? In particular it would seem that the number of dirty old cards might now reduce after a global gc compared to before this change.

Ideally, this would be a change that would go in on its own. (There is no impact on correctness, since in the absence of this change, the dirty card set is an over-approximation.)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24092#discussion_r2006539947


More information about the hotspot-gc-dev mailing list