RFR: 8345423: Shenandoah: Parallelize concurrent cleanup [v8]
Xiaolong Peng
xpeng at openjdk.org
Tue Dec 10 19:48:40 UTC 2024
On Tue, 10 Dec 2024 02:42:50 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/shenandoahHeapRegion.cpp line 91:
>
>> 89: SpaceMangler::mangle_region(MemRegion(_bottom, _end));
>> 90: }
>> 91: _recycling.unset();
>
> Was this necessary, given the c'tor of the struct ShenandoiahFlag is called for the `_recycling` field? To check, I'd assert:
>
> assert(!_recycling.is_set(), "C'tor should have been called by now.");
There could be race condition that other caller immoderately set the flag, hence the assert may fail, notice similar race condition in test, that is why the double check for is_trash() was added.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22538#discussion_r1878729609
More information about the hotspot-gc-dev
mailing list