RFR: Use timed wait to sleep control thread

Aleksey Shipilev shade at openjdk.java.net
Wed Apr 7 17:12:37 UTC 2021


On Wed, 7 Apr 2021 16:32:22 GMT, Aleksey Shipilev <shade 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`.
>
> I don't mind this going into sandbox, but honestly, we need to fix it in the mainline. The awkwardness of control loop sleep-looping gets very tedious.

I shall try and do this in mainline with this: https://bugs.openjdk.java.net/browse/JDK-8264851 -- probably next week, though.

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

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


More information about the shenandoah-dev mailing list