[crac] RFR: Wait until G1 GC has finished before creating a snapshot. [v2]

Jan Kratochvil jkratochvil at openjdk.org
Wed Jul 26 16:52:53 UTC 2023


> @rvansa did report his snapshots are about 2x-3x bigger than they should be. He then also found it only happens if the snapshot is done too quickly after GC should have been run.
> 
> One can reproduce the race case by:
> 
> --- a/src/hotspot/share/gc/g1/g1UncommitRegionTask.hpp
> +++ b/src/hotspot/share/gc/g1/g1UncommitRegionTask.hpp
> @@ -35,7 +35,7 @@ class G1UncommitRegionTask : public G1ServiceTask {
>    // is short, while still making reasonable progress.
>    static const uint UncommitSizeLimit = 128 * M;
>    // Initial delay in milliseconds after GC before the regions are uncommitted.
> -  static const uint UncommitInitialDelayMs = 100;
> +  static const uint UncommitInitialDelayMs = 10*1000;
>    // The delay between two uncommit task executions.
>    static const uint UncommitTaskDelayMs = 10;

Jan Kratochvil has updated the pull request incrementally with one additional commit since the last revision:

  Add a generic virtual method wait_for_collection_finish().
   - based on a review by Radim Vansa.
  Assert calling thread state for wait_for_collection_finish().
   - based on a review by Radim Vansa.

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

Changes:
  - all: https://git.openjdk.org/crac/pull/93/files
  - new: https://git.openjdk.org/crac/pull/93/files/874f7a1c..87972132

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=crac&pr=93&range=01
 - incr: https://webrevs.openjdk.org/?repo=crac&pr=93&range=00-01

  Stats: 20 lines in 5 files changed: 17 ins; 1 del; 2 mod
  Patch: https://git.openjdk.org/crac/pull/93.diff
  Fetch: git fetch https://git.openjdk.org/crac.git pull/93/head:pull/93

PR: https://git.openjdk.org/crac/pull/93


More information about the crac-dev mailing list