RFR: Use timed wait to sleep control thread

Roman Kennke rkennke at openjdk.java.net
Wed Apr 7 16:22:55 UTC 2021


On Tue, 6 Apr 2021 18:44:02 GMT, earthling-amzn <github.com+71722661+earthling-amzn at openjdk.org> wrote:

> Using a timed `wait` rather than a naked sleep allows the control thread to be more responsive to requests from mutators and the regulator thread to start GC cycles. The sleep time is also changed from `ShenandoahControlIntervalMin` to `ShenandoahControlIntervalMax` to reduce unnecessary polling cycles. We could use a plain `wait`, but the control thread is responsible for periodically sending allocation metrics to the `pacer`.

This looks like something that @shipilev has touched a few times before.

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

PR: https://git.openjdk.java.net/shenandoah/pull/28


More information about the shenandoah-dev mailing list