RFR: 8321815: Shenandoah: gc state should be synchronized to java threads only once per safepoint
Y. Srinivas Ramakrishna
ysr at openjdk.org
Fri Dec 15 16:52:40 UTC 2023
On Thu, 14 Dec 2023 19:14:07 GMT, William Kemper <wkemper at openjdk.org> wrote:
> Presently, every change to the gc change is distributed to all java threads. The gc state is only changed on safepoints. For applications with a very large number of java threads this may increase time on the safepoint. It would be better to synchronize the gc state only once per safepoint.
This seems reasonable. How many unnecessary state change distributions to threads do we save from this, so as to quantify the savings?
It would seem as if, as a verification mechanism that no state changes were dropped from distribution, it might be a good idea to assert in both prologue and epilogue of ShenandoahHeap stop-world ops that the `_gc_state_changed` flag is false, indicating that the last state change was "consumed and distributed" by any stop-world op?
-------------
PR Review: https://git.openjdk.org/jdk/pull/17112#pullrequestreview-1784520403
More information about the shenandoah-dev
mailing list