RFR: 8225631: Consider replacing muxAcquire/Release with PlatformMonitor
David Holmes
david.holmes at oracle.com
Sun Nov 15 22:32:10 UTC 2020
Hi Dan,
Thanks for the review.
On 14/11/2020 3:44 am, Daniel D.Daugherty wrote:
> On Fri, 13 Nov 2020 00:51:02 GMT, David Holmes <dholmes at openjdk.org> wrote:
>
>> This RFE was filed a while ago to see if we could get rid of `muxAcquire/release` to reduce overall code complexity. Initially some usages seemed to suffer some slight performance loss when I tried this. However, since then all but one usage have been removed and the final case, the `gInflationLock`'s in `ObjectSynchronizer read_stable_mark` does not suffer any performance degradation. It can also use `PlatformMutex` rather than `PlatformMonitor`.
>>
>> On the plus side we remove a large chunk of complex synchronization code, we delete a `ParkEvent` per thread, and an int field per `ParkEvent` - which is good for footprint.
>>
>> Testing:
>> - GH actions
>> - mach5 tiers 1-3
>> - selected performance testing (guided by that used for JDK-8253064)
>>
>> Thanks,
>> David
>
> I'm good with this fix modulo resolving @coleenp's comments
> about making NINFLATIONLOCKS and gInflationLocks exported.
Fixed.
> src/hotspot/share/runtime/thread.cpp line 4607:
>
>> 4605: // mechanism.
>> 4606: //
>> 4607: // Testing has shown that contention on the ListLock guarding gFreeList
>
> Ouch! I missed a reference to `gFreeList`. Sorry about that.
No problem! It forced me to determine which parts of the comments were
still relevant. :)
Thanks,
David
-----
> -------------
>
> Marked as reviewed by dcubed (Reviewer).
>
> PR: https://git.openjdk.java.net/jdk/pull/1196
>
More information about the hotspot-runtime-dev
mailing list