RFR: 8324649: Shenandoah: refactor implementation of free set [v2]

Kelvin Nilsen kdnilsen at openjdk.org
Thu Jan 25 21:09:35 UTC 2024


On Thu, 25 Jan 2024 20:22:18 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

>> src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 2071:
>> 
>>> 2069:   void do_work(uint worker_id) {
>>> 2070:     T cl;
>>> 2071:     if (CONCURRENT && (worker_id == 0)) {
>> 
>> Could move this work to happen on the control thread? Not sure if there is an advantage to having a single worker do this. Does it matter when other workers observe the effect of `move_collector_sets_to_mutator`?
>
> Was thinking it's best to let the other N-1 worker threads get right to work on updating refs, while this first worker thread starts moving the available collector regions to mutator free set

We want to put these Collector regions into the service of the Mutator threads as quickly as possible in order to avoid Mutator allocation failures.  We also want to complete update-refs as quickly as possible, because that will put a lot more memory into the hands of the Mutators.

The implementation of move_collector_sets_to_mutator() takes the heap lock when it reassigns a region's purpose from Collector to Mutator.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17561#discussion_r1466960527


More information about the shenandoah-dev mailing list