RFR: 8369392: Safepoint sync should suspend GC and Java threads concurrently

David Holmes dholmes at openjdk.org
Tue Oct 28 10:01:41 UTC 2025


On Tue, 21 Oct 2025 20:00:15 GMT, Xiaolong Peng <xpeng at openjdk.org> wrote:

> As @shipilev  mentioned in the description description of [JDK-8369392](https://bugs.openjdk.org/browse/JDK-8369392), we could rearrange the code and ask GC to suspend after announcing safepoint, GC threads and Java threads will sync simultaneously. [The other option](https://github.com/openjdk/jdk/pull/27739/files) I have test is to split STS synchronize into `synchronize_begin` and `synchronize`, which makes GC thread suspension fully aysnc(same Java threads), but I didn't see big performance difference, therefore I chose the simple solution suggested by Aleksey. 
> 
> 
> Test:
> - [x] tier1

This is really for GC folk to decide upon but a few general comments.

This seems like a reasonable hypothesis but the JBS issue does not provide any detailed performance results for each of the GCs to shows the hypothesis is correct and there is some actual value to doing this.

Tier1 testing alone does not seem sufficient to me. And which GCs on which platforms were tested?

I have to wonder whether suspending the GC threads after taking the Threads_lock could have any unintended consequences?

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

PR Comment: https://git.openjdk.org/jdk/pull/27924#issuecomment-3455557440


More information about the hotspot-gc-dev mailing list