The concurrent undo cycle may still take a significant amount of time due to clearing of the next bitmap.
Example:
[2023-08-25T08:51:23.515-0700][160596.213s][16441][info ][gc ] GC(74) Concurrent Undo Cycle
[2023-08-25T08:51:23.518-0700][160596.216s][16441][info ][gc,marking ] GC(74) Concurrent Cleanup for Next Mark
[2023-08-25T08:51:28.829-0700][160601.526s][16441][info ][gc,marking ] GC(74) Concurrent Cleanup for Next Mark 5310.224ms
[2023-08-25T08:51:28.829-0700][160601.527s][16441][info ][gc ] GC(74) Concurrent Undo Cycle 5313.553ms
Think of ways to shorten (or avoid?) (the expensive parts of) the concurrent undo cycle.
(random)options are:
* better track where the marks from VM roots were set and only undo them
* do not mark on the bitmap immediately, but store these somewhere (and do the marks concurrently).