RFR (M): 8245721: Refactor the TaskTerminator
Thomas Schatzl
thomas.schatzl at oracle.com
Wed Jun 24 08:03:20 UTC 2020
Hi all,
can I have reviews for this refactoring of the (OWST) TaskTerminator
to make the algorithm more understandable.
The original implementation imho suffers from two issues:
- manual lock() and unlock() of the _blocker synchronization lock
everywhere, distributed around two separate methods.
- interspersing the actual spinning code somewhere inlined inbetween.
This change tries to hopefully successfully make reasoning about the
code *much* easier by different separation of these two methods, and
using scoped locks.
The final structure of the code has been intensively tested to not cause
a regression in performance, however it made a few "obvious" further
refactorings undesired due to signficant perf regressions.
I believe I found a good tradeoff here, but I am of course open to
improvements :) I tried to sketch a few of those ultimately unsuccessful
attempts in the CR.
CR:
https://bugs.openjdk.java.net/browse/JDK-8245721
Webrev:
http://cr.openjdk.java.net/~tschatzl/8245721/webrev/
Testing:
tier1-5, many many perf rounds, many tier1-X rounds with other patches
Thanks,
Thomas
More information about the hotspot-gc-dev
mailing list