RFR: 8367993: G1: Speed up ConcurrentMark initialization [v3]
Leo Korinth
lkorinth at openjdk.org
Thu Jan 22 12:32:58 UTC 2026
On Mon, 12 Jan 2026 15:29:03 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
>> I see no reason for skipping a periodic GC because we have not yet initialized concurrent mark. If the user for example configured periodic full gc (not doing a periodic concurrent GC) we should not prevent this, just because no young collection has yet been done.
>>
>> Also, there should be no problem starting a concurrent periodic collection from what I can tell, since this will trigger initialization of concurrent mark. I did a quick test to verify this is ok (and it is), but there can of course be some corner case that I'm missing. In that case I would like to understand the corner case better to see if we can come up with a better approach than skipping the periodic collections until a young GC has been triggered.
>
> An unrelated issue could be that the task is run too early, before initialization is completed. However `G1ServiceTask` prevents that to happen already. So I also do not think we should keep this unless there is a demonstrated issue.
I removed it, and it seems to work.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28723#discussion_r2716694240
More information about the hotspot-gc-dev
mailing list