<html><body><p><font size="2" color="#2F2F2F">Dear all</font><font size="2" color="#2F2F2F">,</font><br><br><font size="2" color="#2F2F2F">Would you please review the following change?</font><br><br><font size="2" color="#2F2F2F">Bug: </font><a href="https://bugs.openjdk.java.net/browse/JDK-8204524"><font size="2">https://bugs.openjdk.java.net/browse/JDK-8204524</font></a><br><font size="2" color="#2F2F2F">Webrev: </font><font size="2" color="#0000FF"><a href="http://cr.openjdk.java.net/~mhorie/8204524/webrev.00">http://cr.openjdk.java.net/~mhorie/8204524/webrev.00</a></font><br><br><font size="2" color="#2F2F2F">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.
</font><br><br><font size="2" color="#2F2F2F">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”.</font><br>
<ul type="disc"><li><font size="2" color="#2F2F2F">There is no copy that must finish before the CAS.</font><li><font size="2" color="#2F2F2F">Threads that failed in the CAS must not dereference the forwardee.</font></ul><br><font size="2" color="#2F2F2F">Therefore</font><font size="2" color="#2F2F2F">,</font><font size="2" color="#2F2F2F"> no fence is necessary before and after the CAS.</font><br><br><font size="2" color="#2F2F2F">I measured SPECjbb2015 with this change. As a result</font><font size="2" color="#2F2F2F">,</font><font size="2" color="#2F2F2F"> critical-jOPS performance improved by 27% on POWER8.</font><br><br><br><font size="2">Best regards,</font><br><font size="2">--</font><br><font size="2">Michihiro,</font><br><font size="2">IBM Research - Tokyo</font><BR>
</body></html>