RFR: 8306825: Monitor deflation might be accidentally disabled by zero intervals [v2]

Aleksey Shipilev shade at openjdk.org
Thu Apr 27 09:14:55 UTC 2023


> Found this mistake while backporting [JDK-8305994](https://bugs.openjdk.org/browse/JDK-8305994): if we put GuaranteedAsyncDeflationInterval=0 (defined as "disable guaranteed deflation"), then the MonitorDeflationThread would call `wait(0)`, that is, wait indefinitely for the notify. This breaks triggering the threshold heuristics!
> 
> But what is even more concerning, the same thing would happen even prior to [JDK-8305994](https://bugs.openjdk.org/browse/JDK-8305994), if we put GuaranteedSafepointInterval=0 too. Which means users who kept GSI=0 as the way to dodge excess safepoints, now effectively disable monitor deflation!
> 
> New test cases capture most of the interesting paths/combinations. Since I needed to add more test cases, I ended up refactoring the test for more clarity. The test is also renamed, because now it tests not only GADI, but other intervals too.

Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:

  Drop unneccessary options

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/13635/files
  - new: https://git.openjdk.org/jdk/pull/13635/files/4d0fd09b..4a60694f

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=13635&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=13635&range=00-01

  Stats: 3 lines in 1 file changed: 0 ins; 2 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/13635.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/13635/head:pull/13635

PR: https://git.openjdk.org/jdk/pull/13635


More information about the hotspot-runtime-dev mailing list