RFR(M): 8204524: Unnecessary memory barriers in G1ParScanThreadState::copy_to_survivor_space
Dear all, Would you please review the following change? Bug: https://bugs.openjdk.java.net/browse/JDK-8204524 Webrev: http://cr.openjdk.java.net/~mhorie/8204524/webrev.00 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 well-formed”. 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. Best regards, -- Michihiro, IBM Research - Tokyo
participants (1)
-
Michihiro Horie