RFR(M) 8188165: PPC64: Optimize Unsafe.copyMemory and arraycopy
This is specific to PPC64LE only. The emphasis in the proposed code is on minimizing branches. Thus, this code makes no attempt to avoid misaligned accesses and each block is designed to copy as many elements as possible. As one data point, this yields as much as a 13x improvement in jbyte_disjoint_arraycopy for certain misaligned scenarios. Bug: https://bugs.openjdk.java.net/browse/JDK-8188165 Webrev: http://cr.openjdk.java.net/~mbrandy/8188165/jdk10/v1/ Thanks, -Matt
[Ping] On 9/29/17 4:00 PM, Matthew Brandyberry wrote:
This is specific to PPC64LE only.
The emphasis in the proposed code is on minimizing branches. Thus, this code makes no attempt to avoid misaligned accesses and each block is designed to copy as many elements as possible.
As one data point, this yields as much as a 13x improvement in jbyte_disjoint_arraycopy for certain misaligned scenarios.
Bug: https://bugs.openjdk.java.net/browse/JDK-8188165 Webrev: http://cr.openjdk.java.net/~mbrandy/8188165/jdk10/v1/
Thanks, -Matt
Hi,
[Ping]
On 9/29/17 4:00 PM, Matthew Brandyberry wrote:
This is specific to PPC64LE only.
The emphasis in the proposed code is on minimizing branches. Thus, this code makes no attempt to avoid misaligned accesses and each block is designed to copy as many elements as possible.
As one data point, this yields as much as a 13x improvement in jbyte_disjoint_arraycopy for certain misaligned scenarios.
Bug: https://bugs.openjdk.java.net/browse/JDK-8188165 Webrev: http://cr.openjdk.java.net/~mbrandy/8188165/jdk10/v1/
For the records, Martin already reviewed that change and pointed out some aspects that need to be improved / addressed in that change. Mainly: - Avoid adding another stub - It should not be just a solution for LE (it must work for both endianness) Additionally, I tested the change using SPECjbb2015 and found a slight regression. On a POWER8, SMT=8, score of 10 runs: Mean max-jOPS Mean critical-jOPS SD max-jOPS SD critical-jOPS +--------+---------------+--------------------+-------------+------------------+ w/ opto | 24387.6 | 3905.4 | 972.960 | 323.4238 | +------------------------------------------------------------------------------+ wo/ opto | 24891.7 | 3933.1 | 227.518 | 293.6455 | +--------+---------------+--------------------+-------------+------------------+ I'll try to address it before OpenJDK 11 rampdown. Best regards, Gustavo [RUNs] -- w/ opto -- root@pub:~/SPECjbb2015-1.00# for i in 18-04-10_222315-not-reverted 18-04-11_211557-not-reverted 18-04-11_233332-not-reverted 18-04-12_014507-not-reverted 18-04-14_132617-not-reverted 18-04-14_154517-not-reverted 18-04-14_181417-not-reverted 18-04-14_203008-not-reverted 18-04-14_224917-not-reverted 18-04-15_010546-not-reverted; do fgrep "jOPS =" $i/controller.out;done RUN RESULT: hbIR (max attempted) = 27674, hbIR (settled) = 26176, max-jOPS = 22693, critical-jOPS = 3386 RUN RESULT: hbIR (max attempted) = 27674, hbIR (settled) = 26793, max-jOPS = 24907, critical-jOPS = 4070 RUN RESULT: hbIR (max attempted) = 28420, hbIR (settled) = 27532, max-jOPS = 24725, critical-jOPS = 4281 RUN RESULT: hbIR (max attempted) = 27674, hbIR (settled) = 26176, max-jOPS = 22416, critical-jOPS = 4321 RUN RESULT: hbIR (max attempted) = 27674, hbIR (settled) = 26793, max-jOPS = 24907, critical-jOPS = 3777 RUN RESULT: hbIR (max attempted) = 27674, hbIR (settled) = 26176, max-jOPS = 24907, critical-jOPS = 4117 RUN RESULT: hbIR (max attempted) = 27674, hbIR (settled) = 26793, max-jOPS = 24907, critical-jOPS = 4124 RUN RESULT: hbIR (max attempted) = 27674, hbIR (settled) = 26176, max-jOPS = 24630, critical-jOPS = 3516 RUN RESULT: hbIR (max attempted) = 27674, hbIR (settled) = 26176, max-jOPS = 24907, critical-jOPS = 3663 RUN RESULT: hbIR (max attempted) = 33169, hbIR (settled) = 27674, max-jOPS = 24877, critical-jOPS = 3799 -- wo/ opto -- root@pub:~/SPECjbb2015-1.00# for i in 18-04-11_004013-reverted 18-04-12_040118-reverted 18-04-12_061741-reverted 18-04-12_083821-reverted 18-04-15_025546-reverted 18-04-15_050857-reverted 18-04-15_072246-reverted 18-04-15_093501-reverted 18-04-15_115234-reverted 18-04-15_141256-reverted; do fgrep "jOPS =" $i/controller.out;done RUN RESULT: hbIR (max attempted) = 27674, hbIR (settled) = 26176, max-jOPS = 24630, critical-jOPS = 4258 RUN RESULT: hbIR (max attempted) = 29485, hbIR (settled) = 28420, max-jOPS = 25062, critical-jOPS = 3839 RUN RESULT: hbIR (max attempted) = 27674, hbIR (settled) = 26793, max-jOPS = 24907, critical-jOPS = 4056 RUN RESULT: hbIR (max attempted) = 33169, hbIR (settled) = 27674, max-jOPS = 24877, critical-jOPS = 3985 RUN RESULT: hbIR (max attempted) = 27674, hbIR (settled) = 26793, max-jOPS = 24907, critical-jOPS = 3897 RUN RESULT: hbIR (max attempted) = 28420, hbIR (settled) = 27532, max-jOPS = 25010, critical-jOPS = 4308 RUN RESULT: hbIR (max attempted) = 29485, hbIR (settled) = 28420, max-jOPS = 25357, critical-jOPS = 4096 RUN RESULT: hbIR (max attempted) = 27674, hbIR (settled) = 26176, max-jOPS = 24907, critical-jOPS = 3798 RUN RESULT: hbIR (max attempted) = 27674, hbIR (settled) = 26176, max-jOPS = 24630, critical-jOPS = 3829 RUN RESULT: hbIR (max attempted) = 27674, hbIR (settled) = 26176, max-jOPS = 24630, critical-jOPS = 3265
participants (2)
-
Gustavo Romero
-
Matthew Brandyberry