RFR(M): 8204524: Unnecessary memory barriers in G1ParScanThreadState::copy_to_survivor_space
HORIE at jp.ibm.com
Thu Jun 7 06:01:25 UTC 2018
Would you please review the following change?
G1ParScanThreadState::copy_to_survivor_space tries to move live objects to
a different location. It uses a forwarding technique and allows multiple
threads to compete for performing the copy step.
A copy is performed after a thread succeeds in the CAS. CAS-failed threads
are not allowed to dereference the forwardee concurrently. Current code is
already written so that CAS-failed threads do not dereference the
forwardee. Also, this constraint is documented in a caller function
mark_forwarded_object as “the object might be in the process of being
copied by another worker so we cannot trust that its to-space image is
There is no copy that must finish before the CAS.
Threads that failed in the CAS must not dereference the forwardee.
Therefore, no fence is necessary before and after the CAS.
I measured SPECjbb2015 with this change. As a result, critical-jOPS
performance improved by 27% on POWER8.
IBM Research - Tokyo
More information about the hotspot-dev