Optimization to improve biased locking in Hadoop Map tasks for ppc64le on jdk8u

Ting YY Wang wtingsh at cn.ibm.com
Tue Jan 7 01:00:56 UTC 2020


This is not a RFR, but I want to share my prototype implementation for
optimizations in the biased locking. I provide code for ppc64le due to my
limited resource availability, though it should be general purpose for all
the platforms in nature.

Background:
I found two interesting situations.
(1) At the beginning of deoptimization process, all biased locks are
revoked, so that later they can be inflated and then moved from compiled
frame to interpreter frame.
(2) Periodic lock contention occurs from background thread (e.g.
TaskReporter in Hadoop). Lock bias will be revoked due to the contention,
and there is less chance that lock can maintain bias.

Proposal:
(1) Enhance deoptimization to keep locks biased.
Once vframeArray is created by create_vframeArray, it is guaranteed there
will be no safepoint until fields are rematerialized. So this is a equal
guarantee that lock biased state will be preserved during this period, and
it is possible to simply move lock from compiled frame to interpreter frame
without inflate (Thanks to the comments in BasicLock::move_to()).
(2) Eagerly manipulate to biased state for target lock states if possible.
To determine the target locks, my approach uses profiling to identify locks
that are hot and accessed by a single thread.

Prototype implementation:
http://cr.openjdk.java.net/~mhorie/bl/webrev/

Let me know if this hack can benefit your workload, and any comments are
welcomed. Thanks!


Best Regards,
Felix Wang (王挺, Ting Wang)
-----------------------------
OpenPOWER PoC/Performance
IBM GCG Systems & Technology Lab

Tel: (86-21) 6092-2393
Mobile: (86) 135-8554-9659
E-Mail: wtingsh at cn.ibm.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/ppc-aix-port-dev/attachments/20200107/3bcff9fe/attachment.htm>


More information about the ppc-aix-port-dev mailing list