RFR: 8338737: Shenandoah: Reset marking bitmaps after the cycle [v3]

Xiaolong Peng xpeng at openjdk.org
Wed Jan 8 21:40:59 UTC 2025


On Wed, 8 Jan 2025 20:43:36 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

>> Xiaolong Peng has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 17 additional commits since the last revision:
>> 
>>  - Merge branch 'openjdk:master' into reset-bitmap
>>  - Address review comments
>>  - Merge branch 'openjdk:master' into reset-bitmap
>>  - Remove ShenandoahResetUpdateRegionStateClosure
>>  - Always set_mark_incomplete when reset mark bitmap
>>  - Fix
>>  - Add comments
>>  - fix
>>  - Not reset_mark_bitmap after cycle when  is_concurrent_old_mark_in_progress or is_prepare_for_old_mark_in_progress
>>  - Not invoke set_mark_incomplete when reset bitmap after cycle
>>  - ... and 7 more: https://git.openjdk.org/jdk/compare/5c258fa2...f82fdfaa
>
> src/hotspot/share/gc/shenandoah/shenandoahConcurrentGC.cpp line 592:
> 
>> 590:   // If it is old GC bootstrap cycle, always clear bitmap for global gen
>> 591:   // to ensure bitmap for old gen is clear for old GC cycle after this.
>> 592:   if (_do_old_gc_bootstrap) {
> 
> This may deserve a comment.  It seems we ought to clear the old-gen mark bitmap at the end of coalesce-and-fill.  But that does not allow us to avoid clearing old-gen mark bitmaps at start of bootstrap because when young-gen regions are promoted in place, the mark bitmap is preserved for those regions, and since they are considered old at the end of the GC cycle during which they were promoted, those bitmaps will not be cleared by op_reset_after_collect().  Is there a way to improve this behavior?
> 
> For example, in op_reset_after_collect(), maybe we should clear old-gen bitmaps also (at least for recently promoted in place regions) unless old marking is in process and/or mixed evacuations are in progress.
> 
> Maybe this can be tackled in a separate PR, but would be good to file JBS ticket now if there is agreement on the approach.

Yes, We can reset bimap of old region when there in place promotion and all old regions after coalesce-and-fill for old gen. 

Thanks Kelvin, I'll create a JBS ticket for this.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22778#discussion_r1907893752


More information about the hotspot-gc-dev mailing list