<font size=2 face="sans-serif">Hi David,</font><br><br><font size=2 face="sans-serif">> Just need another reviewer to chime
in - given you and Martin are both</font><br><font size=2 face="sans-serif">> contributors. Or are you the main
contributor with Martin being a reviewer?</font><br><br><font size=2 face="sans-serif">Martin and I are contributors of this
change.</font><br><br><font size=2 face="sans-serif">> Still a problem on Solaris sparc:</font><br><br><font size=2 face="sans-serif">Martin, could you create a new change
in webrev with the patch that David sent?</font><br><br><font size=2 face="sans-serif">Regards,<br>Hiroshi<br>-----------------------<br>Hiroshi Horii, Ph.D.<br>IBM Research - Tokyo<br></font><br><br><tt><font size=2>David Holmes <david.holmes@oracle.com> wrote
on 05/10/2016 21:29:53:<br><br>> From: David Holmes <david.holmes@oracle.com></font></tt><br><tt><font size=2>> To: Hiroshi H Horii/Japan/IBM@IBMJP, "hotspot-runtime-<br>> dev@openjdk.java.net" <hotspot-runtime-dev@openjdk.java.net></font></tt><br><tt><font size=2>> Cc: Tim Ellison <Tim_Ellison@uk.ibm.com>,
"ppc-aix-port-<br>> dev@openjdk.java.net" <ppc-aix-port-dev@openjdk.java.net>,
"hotspot-<br>> gc-dev@openjdk.java.net" <hotspot-gc-dev@openjdk.java.net></font></tt><br><tt><font size=2>> Date: 05/10/2016 21:31</font></tt><br><tt><font size=2>> Subject: Re: RFR(M): 8155949: Support relaxed
semantics in cmpxchg</font></tt><br><tt><font size=2>> <br>> On 10/05/2016 9:04 PM, David Holmes wrote:<br>> > Hi Hiroshi,<br>> ><br>> > On 10/05/2016 8:44 PM, Hiroshi H Horii wrote:<br>> >> Hi All,<br>> >><br>> >> Can I please request reviews for the following change?<br>> >><br>> >> Code change:<br>> >> </font></tt><a href=http://cr.openjdk.java.net/~mdoerr/8155949_relaxed_cas/webrev.01/><tt><font size=2>http://cr.openjdk.java.net/~mdoerr/8155949_relaxed_cas/webrev.01/</font></tt></a><tt><font size=2><br>> ><br>> > Changes look good. I'm currently running them through our internal
build<br>> > system. I will sponsor this and push the change through JPRT.<br>> <br>> Still a problem on Solaris sparc:<br>> <br>> "/opt/jprt/T/P1/102505.daholme/s/hotspot/src/share/vm/runtime/<br>> atomic.inline.hpp", <br>> line 96: Error: Could not find a match for static Atomic::cmpxchg(signed
<br>> char, volatile signed char*, signed char).<br>> 1 Error(s) detected.<br>> <br>> Needs this patch:<br>> <br>> diff -r 68853ef19be9 src/share/vm/runtime/atomic.inline.hpp<br>> --- a/src/share/vm/runtime/atomic.inline.hpp<br>> +++ b/src/share/vm/runtime/atomic.inline.hpp<br>> @@ -92,7 +92,7 @@<br>> <br>>   #ifndef VM_HAS_SPECIALIZED_CMPXCHG_BYTE<br>>   // See comment in atomic.cpp how to override.<br>> -inline jbyte Atomic::cmpxchg(jbyte exchange_value, volatile jbyte
<br>> *dest, jbyte comparand)<br>> +inline jbyte Atomic::cmpxchg(jbyte exchange_value, volatile jbyte
<br>> *dest, jbyte comparand, cmpxchg_memory_order order)<br>>   {<br>>     return cmpxchg_general(exchange_value, dest, comparand);<br>>   }<br>> <br>> David<br>> -----<br>> <br>> > Just need another reviewer to chime in - given you and Martin
are both<br>> > contributors. Or are you the main contributor with Martin being
a reviewer?<br>> ><br>> > Thanks,<br>> > David<br>> ><br>> > PS. It's my night now so I'll be signing off and will pick this
up in<br>> > the morning.<br>> ><br>> >> This change follows the discussion started from these mails.<br>> >> </font></tt><a href="http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2016-"><tt><font size=2>http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2016-</font></tt></a><tt><font size=2><br>> April/018960.html<br>> >><br>> >> </font></tt><a href="http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2016-"><tt><font size=2>http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2016-</font></tt></a><tt><font size=2><br>> April/019148.html<br>> >><br>> >> </font></tt><a href="http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2016-"><tt><font size=2>http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2016-</font></tt></a><tt><font size=2><br>> May/019320.html<br>> >><br>> >><br>> >> Description:<br>> >> This change provides relaxed compare-and-exchange by introducing<br>> >> relaxed memory order. As described in atomic_linux_ppc.inline.hpp,<br>> >> the current implementation of cmpxchg is fence_cmpxchg_acquire.<br>> >> This implementation is useful for general purposes because
twice calls of<br>> >> sync before and after cmpxchg will provide strict consistency.<br>> >> However, they sometimes cause overheads because sync instructions
are<br>> >> very expensive in the current POWER chip design.<br>> >><br>> >> We confirmed this change improves performance of copy_to_survivor<br>> >> in the parallel GC. However, we will need more investigation
of GC<br>> >> by more experts. So, We would like to request a review of
the change<br>> >> of cmpxchg first (as Martin requested).<br>> >> </font></tt><a href="http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2016-"><tt><font size=2>http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2016-</font></tt></a><tt><font size=2><br>> April/019188.html<br>> >><br>> >><br>> >> Summary of source code changes:<br>> >><br>> >> * src/share/vm/runtime/atomic.hpp<br>> >>      - Defines enum memory_order and adds
a parameter to cmpxchg.<br>> >><br>> >> * src/share/vm/runtime/atomic.cpp<br>> >> * src/os_cpu/bsd_x86/vm/atomic_bsd_x86.inline.hpp<br>> >> * src/os_cpu/bsd_zero/vm/atomic_bsd_zero.inline.hpp<br>> >> * src/os_cpu/linux_aarch64/vm/atomic_linux_aarch64.inline.hpp<br>> >> * src/os_cpu/linux_sparc/vm/atomic_linux_sparc.inline.hpp<br>> >> * src/os_cpu/linux_x86/vm/atomic_linux_x86.inline.hpp<br>> >> * src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp<br>> >> * src/os_cpu/solaris_sparc/vm/atomic_solaris_sparc.inline.hpp<br>> >> * src/os_cpu/solaris_x86/vm/atomic_solaris_x86.inline.hpp<br>> >> * src/os_cpu/windows_x86/vm/atomic_windows_x86.inline.hpp<br>> >>      - Added a parameter for each cmpxchg
function to follow<br>> >>         the change of atomic.hpp. Their
implementations are not changed.<br>> >><br>> >> * src/os_cpu/aix_ppc/vm/atomic_aix_ppc.inline.hpp<br>> >> * src/os_cpu/linux_ppc/vm/atomic_linux_ppc.inline.hpp<br>> >>      - Added a parameter for each cmpxchg
function to follow<br>> >>         the change of atomic.hpp. In
addition, implementations<br>> >>         are changed corresponding to
the specified memory_order.<br>> >><br>> >> Regards,<br>> >> Hiroshi<br>> >> -----------------------<br>> >> Hiroshi Horii, Ph.D.<br>> >> IBM Research - Tokyo<br>> >><br>> <br></font></tt><BR>