When an archive region is deallocated (e.g. if we did not manage to map in or find an archive), the G1CollectedHeap::dealloc_archive_regions() method shrinks the heap (i.e. uncommits the region) unconditionally.
This is wrong in case this would decrease the allocated heap below -Xms.
Particularly noticeable with -Xms == -Xmx and running with gc+region=trace debugging: at the beginning G1 allocates a region as closed archive, but then *uncommits* it.
This may cause really minor performance hiccups/regressions, but often G1 re-commits that region later anyway.
Afaict this is a bug introduced with the initial archive regions support.
This is wrong in case this would decrease the allocated heap below -Xms.
Particularly noticeable with -Xms == -Xmx and running with gc+region=trace debugging: at the beginning G1 allocates a region as closed archive, but then *uncommits* it.
This may cause really minor performance hiccups/regressions, but often G1 re-commits that region later anyway.
Afaict this is a bug introduced with the initial archive regions support.
- relates to
-
JDK-8308854 G1 archive region allocation may expand/shrink the heap above/below -Xms
- Open
- links to
-
Review openjdk/jdk/14145