RFR: 8305994: Guarantee eventual async monitor deflation [v4]

Aleksey Shipilev shade at openjdk.org
Tue Apr 18 08:50:47 UTC 2023


On Mon, 17 Apr 2023 14:48:04 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 1142:
> 
>> 1140:     // it is still in no-progress stride. In this "progress" case, the generic code would
>> 1141:     // zero the counter, and we allow it to happen.
>> 1142:     _no_progress_skip_increment = true;
> 
> I think this makes sense for any deflation executed asynchronously from asynchronous (hah) deflation, or? E.g. deflation as a side-effect of thread dumps. (though I think that is the only example).
> 
> I wonder if thread-dump-induced deflation that happens at the same time could eat up your _no_progress_skip_increment. But I guess that is very improbable.

Yes, whitebox-induced deflation eats this flag. I'd like to keep our eyes on the prize here: we want the guaranteed deflation added by this patch to avoid the apparent memory leak in 17u, and this new deflation should not interact with the threshold heuristic in breaking ways. Everything else falls under the scope of reviewing the deflation triggering heuristics, IMO, which should happen after we get the safety net in.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13474#discussion_r1169709901


More information about the hotspot-runtime-dev mailing list