RFR: 8305994: Guarantee eventual async monitor deflation [v4]
Aleksey Shipilev
shade at openjdk.org
Tue Apr 18 10:04:51 UTC 2023
On Mon, 17 Apr 2023 15:20:32 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Volker is right again (fixing unsigned underflow)
>
> src/hotspot/share/runtime/synchronizer.cpp line 1129:
>
>> 1127: // not reached, to keep the memory utilization at bay when many threads
>> 1128: // touched many monitors.
>> 1129: log_info(monitorinflation)("Async deflation needed: guaranteed interval reached");
>
> Here, and above: print out time & threshold in question, and check those in test output? Up to you though.
Our users usually give us the JVM command lines, so we know the interval exactly :) But yeah, we can add a more verbose logging to give more comprehensive heuristics logging.
This actually highlights a bug: the last time since deflation is set to `0`, which means guaranteed deflation triggers immediately. Fixed that too.
> test/hotspot/jtreg/runtime/Monitor/GuaranteedAsyncDeflationIntervalTest.java line 119:
>
>> 117: "-Xmx100M",
>> 118: "-XX:+UnlockDiagnosticVMOptions",
>> 119: "-XX:GuaranteedAsyncDeflationInterval=5000",
>
> Why not setting AsyncDeflationInterval to a very high value, effectively disabling it, and then check that we don't see MSG_THRESHOLD but still see MSG_GUARANTEED?
`MUDT=0` has the similar effect. But yes, we can also test `ADI=0` here, added. Also parallelized the test, so execution time is not bad.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13474#discussion_r1169787139
PR Review Comment: https://git.openjdk.org/jdk/pull/13474#discussion_r1169787249
More information about the hotspot-runtime-dev
mailing list