RFR: 8345423: Shenandoah: Parallelize concurrent cleanup [v8]
Xiaolong Peng
xpeng at openjdk.org
Tue Dec 10 21:02:42 UTC 2024
On Tue, 10 Dec 2024 01:52:41 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:
>> Xiaolong Peng has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Use parallel_heap_region_iterate to walk the regions
>
> src/hotspot/share/gc/shenandoah/shenandoahGeneration.cpp line 884:
>
>> 882: // During full gc, multiple GC worker threads may change region affiliations without a lock. No lock is enforced
>> 883: // on read and write of _affiliated_region_count. At the end of full gc, a single thread overwrites the count with
>> 884: // a coherent value.
>
> Is the comment in its entirety still valid now? The part about "No lock is enforced" seems a bit dubious given the atomic op.
>
> Similarly the comment in `decrement_...` below.
Yes It is atomic, the lock/safepoint seems not needed. I'll probably keep the comment as it is in this PR, since the are called from different places of FullGC and concurrentGC, we can cleanup these methods later I think.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22538#discussion_r1878849089
More information about the shenandoah-dev
mailing list