RFR: 8305994: Guarantee eventual async monitor deflation [v3]
Volker Simonis
simonis at openjdk.org
Mon Apr 17 11:56:34 UTC 2023
On Mon, 17 Apr 2023 11:24:42 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> See discussion in the bug. This PR introduces a safety rail that kicks in when the threshold heuristics fails, and it is cleanly backportable to JDK 17, where the problem manifests as apparent memory leak. There are other options to resolve this (see the bug), but I think this one is the easiest in the interim.
>>
>> Additional testing:
>> - [x] Linux x86_64 `tier1`
>> - [x] Linux x86_64 `tier2`
>> - [x] `runtime/Monitor` tests
>> - [x] Ad-hoc experiments (see example in the bug)
>> - [x] New feature test
>
> Aleksey Shipilev has updated the pull request incrementally with two additional commits since the last revision:
>
> - Sort imports
> - Volker is right
This really seems to be a never ending story...
Sorry, but I didn't realized that `_no_progress_cnt` is `unsigned` and this now triggers warnings in your new assertions. I leave it up to you if you want to fix this by changing `_no_progress_cnt` to `signed` or by re-introducing the extra flag but only use it for the non-progress case.
PS: I still like your commit message. I'll print it out and pin it on the wall such that my wife and children can read it every day :)
-------------
Changes requested by simonis (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/13474#pullrequestreview-1387868844
More information about the hotspot-runtime-dev
mailing list