RFR: Improve humongous remset scan
William Kemper
wkemper at openjdk.java.net
Tue Jun 14 22:54:06 UTC 2022
On Tue, 14 Jun 2022 20:09:14 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:
> These changes allow humongous objects residing within the remembered set to be scanned by muitiple concurrent GC worker threads, allowing more efficient parallelization of the remembered set scanning effort.
src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 2464:
> 2462: // old-gen heap regions.
> 2463: if (r->is_humongous()) {
> 2464: // Need to examine both dirty and clean cards during mixed evac.
Sorry, I'm not seeing it. This code looks like it will compute the same `end_of_object` for every region in the humongous object (line 2468), but `start_of_scan` will be `r->bottom`. It seems like this code will have every thread that encounters a region in the humongous object scan the regions between `r` and `end_of_object`. The original method `oop_iterate_humongous` would scan only between `r->bottom` and `r->top`. Maybe we want `end_of_object` to be `r->top` and combine that with only scanning dirty cards?
src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp line 621:
> 619: // Scan all data, regardless of whether cards are dirty
> 620: while (num_cards-- > 0) {
> 621: obj->oop_iterate(blk, MemRegion(start, start + CardTable::card_size_in_words()));
Could this just be `obj->oop_iterate(blk, MemRegion(start, start + CardTable::card_size_in_words() * num_cards))`?
-------------
PR: https://git.openjdk.org/shenandoah/pull/144
More information about the shenandoah-dev
mailing list