RFR: 8264026: Remove dependency between free collection set and eagerly reclaim humongous object tasks

Stefan Johansson sjohanss at openjdk.java.net
Tue Mar 23 20:53:40 UTC 2021


On Tue, 23 Mar 2021 15:16:16 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

> Hi,
> 
>   I am currently working on [JDK-8214237](https://bugs.openjdk.java.net/browse/JDK-8214237) to merge some phases from `G1CollectedHeap::post_evacuate_collection_set()` into less parallel phases.
> 
> While investigating dependencies I found that `free_collection_set` and `eagerly_reclaim_humongous_regions` have a dependency: `free_collection_set` rebuilds the free list at the end (in another parallel phase :( ), and `eagerly_reclaim_humongous_regions` adds to those regions.
> 
> This dependency is unnecessary: just move the rebuilding of the free list after eagerly reclaiming humongous regions, and neither needs to care about updating the free regions list. 
> 
> Testing: hs-tier1-5

Looks good, one comment below.

src/hotspot/share/gc/g1/g1CollectedHeap.cpp line 4488:

> 4486: void G1CollectedHeap::rebuild_free_region_list() {
> 4487:   Ticks start = Ticks::now();
> 4488:   _hrm.rebuild_free_list(workers());

The first thing done in`rebuild_free_list()` is to drop the current free_list to rebuild if from scratch. So we should now be able to remove the call `prepend_to_freelist(&local_cleanup_list)` in `eagerly_reclaim_humongous_regions()`. Doing so the `local_cleanup_list` is only used for printing, and we should probably investigate if this can be done differently.

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

Marked as reviewed by sjohanss (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/3154



More information about the hotspot-gc-dev mailing list