RFR(M): 8154736: enhancement of cmpxchg and copy_to_survivor for ppc64

Doerr, Martin martin.doerr at sap.com
Tue Apr 24 14:20:06 UTC 2018

Hi Michihiro,

thanks for posting the new webrev. I think this looks much better, now.

I don't like the "if log_is_enabled() acquire()" code so much, but it looks correct to me. I'd prefer your OrderAccess:consume() proposal, but I can live with it if other reviewers prefer it.

I couldn't find any store-load pattern which may miss ordering, but I'd highly appreciate if another reviewer double-checked that the barriers are right this time.

If needed, we could use memory_order_acq_rel which I'm planning to add with JDK-8202080. I guess this wouldn't really impact performance.

I think 6% performance gain is really worth doing this change.

Best regards,

From: Michihiro Horie [mailto:HORIE at jp.ibm.com]
Sent: Montag, 23. April 2018 12:34
To: ppc-aix-port-dev at openjdk.java.net; hotspot-dev at openjdk.java.net; hotspot-gc-dev at openjdk.java.net
Cc: Hiroshi H Horii <HORII at jp.ibm.com>; Gustavo Romero <gromero at linux.vnet.ibm.com>; Kazunori Ogata <OGATAK at jp.ibm.com>; shade at redhat.com; aph at redhat.com; Doerr, Martin <martin.doerr at sap.com>
Subject: RFR(M): 8154736: enhancement of cmpxchg and copy_to_survivor for ppc64

Dear all,

I would like to ask reviews on 8154736 "enhancement of cmpxchg and copy_to_survivor". The change adds options to avoid expensive syncs with compare-and-exchange. An experiment by using SPECjbb2015 showed 6% improvement in critical-jOPS. This change focuses on ppc64 but would be potentially beneficial for aarch64.

Although discussions stopped at http://mail.openjdk.java.net/pipermail/ppc-aix-port-dev/2016-October/002718.html, I would like to restart the review by taking over Hiroshi's work if the discussion is still open.

Bug: https://bugs.openjdk.java.net/browse/JDK-8154736
Webrev: http://cr.openjdk.java.net/~mhorie/8154736/webrev.08/

Previous review had discussions on improper log output (http://mail.openjdk.java.net/pipermail/ppc-aix-port-dev/2016-September/002672.html). Logs can be generated properly with this change, but I would like to ask if we should use "if(log) OrderAccess:acquire()" as is in webrev or more general approach with a call to OrderAccess:consume() with empty implementation on all supported platforms.

Also, there were discussions on the problem of unawareness of copied obj (http://mail.openjdk.java.net/pipermail/ppc-aix-port-dev/2016-October/002696.html). This change adds "release" in cmpxchg_pre_membar. This was discussed in http://mail.openjdk.java.net/pipermail/ppc-aix-port-dev/2016-October/002698.html.

I measured SPECjbb2015 with its multi JVMs mode on a POWER8 node (for JDK11, I modified MANIFEST in specjbb2015.jar to specify locations of JAXB related libraries). As a result, critical-jOPS improved by 6% due to this change.

Best regards,
IBM Research - Tokyo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/attachments/20180424/a818d4b0/attachment.htm>

More information about the hotspot-gc-dev mailing list