RFR: 8376839: GenShen: Improve performance of evacuations into the old generation [v3]
Kelvin Nilsen
kdnilsen at openjdk.org
Tue Feb 10 02:01:09 UTC 2026
On Mon, 9 Feb 2026 21:53:02 GMT, William Kemper <wkemper at openjdk.org> wrote:
>> src/hotspot/share/gc/shenandoah/shenandoahOldGeneration.cpp line 641:
>>
>>> 639: // when the in-place-promotion is completed. Such a region may be used for additional
>>> 640: // promotions in the same cycle it was itself promoted.
>>> 641: _card_scan->update_card_table(region->get_top_at_evac_start(), region->top());
>>
>> parallel_heap_region_iterate(which is used by for_each_region) use single thread if the number of is <= 4096; the assumption is for most of lightweight task, for example, capturing TAMS at init mark, the overhead of multiple threads is more expensive than the task itself. For more complicated task, we may not want to use parallel_heap_region_iterate, I had a [PR](https://github.com/openjdk/jdk/pull/28613) recently to address this kind of issue in bitmap reset.
>>
>> I'm not sure update_card_table is suitable to use parallel_heap_region_iterate after reading the impl, I saw you also added timing metrics for it, you can do some simple test to verify it.
>
> I added it as a timed phase, but not as a parallel worker phase so it won't show the break down of time per thread. The work could be kind of "lumpy" in that only _some_ old regions will accepted evacuations. I will try some experiments to force parallelization.
Maybe we make further efficiency improvements in a follow-on PR.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29511#discussion_r2785395884
More information about the hotspot-gc-dev
mailing list