PPC64 VSX load/store instructions in stubs

Doerr, Martin martin.doerr at sap.com
Mon May 30 09:56:25 UTC 2016


Hi Michihiro,

thanks for implementing the VSX versions.

Gustavo's change "8154156: PPC64: improve array copy stubs by using vector instructions" is pushed into hs-comp.
Your change needs to get adapted:

-          The vm_version and assembler parts are already there.

-          Vector-scalar load/store instructions use VectorSRegisters, now.

The byte and int version look good to me. I think the long version should be implemented in a similar way: check for has_vsx() is necessary, the length comparison should be done inside of the block.

Best regards,
Martin


From: Michihiro Horie [mailto:HORIE at jp.ibm.com]
Sent: Montag, 30. Mai 2016 03:43
To: Miki M Enoki <ENOMIKI at jp.ibm.com>
Cc: Breno Leitao <brenohl at br.ibm.com>; Gustavo Romero <gromero at linux.vnet.ibm.com>; hotspot-dev at openjdk.java.net; Doerr, Martin <martin.doerr at sap.com>; ppc-aix-port-dev at openjdk.java.net; Simonis, Volker <volker.simonis at sap.com>; Volker Simonis <volker.simonis at gmail.com>
Subject: Re: PPC64 VSX load/store instructions in stubs


Dear Breno, Gustavo, Voker, and Martin,
I am a cowoker of Miki.

I implemented VSX disjoint arraycopy functions for byte, int, and long. Although Miki had implemented VSX disjoint long arraycopy, we found a couple of bugs so I fixed it. Would you please review them?

Micro benchmarks for byte and int are as follows. (The one for long is the same as Miki's, which was attached before by Miki)
(See attached file: ArrayCopyTest_byte.java)(See attached file: ArrayCopyTest_int.java)

Results are as follows. (For the short result, I used Gustavo's code.)
(See attached file: result_disjoint-arraycopy_vsx-max.jpg)

Patch for Java8:
(See attached file: hotspot_jdk8.diff)

Patch for Java9:
(See attached file: hotspot_jdk9.diff)

Best regards,
--
Michihiro Horie,
IBM Research - Tokyo

[Inactive hide details for Miki M Enoki---2016/05/25 00:15:19---Hi Breno, Thank you for your reply.]Miki M Enoki---2016/05/25 00:15:19---Hi Breno, Thank you for your reply.

From: Miki M Enoki/Japan/IBM
To: Breno Leitao <brenohl at br.ibm.com<mailto:brenohl at br.ibm.com>>
Cc: Gustavo Romero <gromero at linux.vnet.ibm.com<mailto:gromero at linux.vnet.ibm.com>>, "hotspot-dev at openjdk.java.net<mailto:hotspot-dev at openjdk.java.net>" <hotspot-dev at openjdk.java.net<mailto:hotspot-dev at openjdk.java.net>>, "Doerr, Martin" <martin.doerr at sap.com<mailto:martin.doerr at sap.com>>, "ppc-aix-port-dev at openjdk.java.net<mailto:ppc-aix-port-dev at openjdk.java.net>" <ppc-aix-port-dev at openjdk.java.net<mailto:ppc-aix-port-dev at openjdk.java.net>>, "Simonis, Volker" <volker.simonis at sap.com<mailto:volker.simonis at sap.com>>, Volker Simonis <volker.simonis at gmail.com<mailto:volker.simonis at gmail.com>>
Date: 2016/05/25 00:15
Subject: Re: PPC64 VSX load/store instructions in stubs

________________________________


Hi Breno,

Thank you for your reply.

>The same mechanism could be used to copy arrays of short elements, as Gustavo was
>working on. Do you agree?

I think the mechanism is different with type (byte, short, int, long...).
Gustavo will apply a pach with VSX for short array copy, so it would be reasonable to use VSX instruction for long array copy, too.

My coworker is also creating byte and int arraycopy with VSX. He will post an email to this mailing list.
I appreciate it if our patch for byte, int and long copy is applied to OpenJDK.


Best regards,
Miki




[Inactive hide details for Breno Leitao ---2016/05/17 02:29:32---Hi Miki, On 05/16/2016 02:53 AM, Miki M Enoki wrote:]Breno Leitao ---2016/05/17 02:29:32---Hi Miki, On 05/16/2016 02:53 AM, Miki M Enoki wrote:

From: Breno Leitao <brenohl at br.ibm.com<mailto:brenohl at br.ibm.com>>
To: Miki M Enoki/Japan/IBM at IBMJP, "Doerr, Martin" <martin.doerr at sap.com<mailto:martin.doerr at sap.com>>,
Cc: Gustavo Romero <gromero at linux.vnet.ibm.com<mailto:gromero at linux.vnet.ibm.com>>, Volker Simonis <volker.simonis at gmail.com<mailto:volker.simonis at gmail.com>>, "Simonis, Volker" <volker.simonis at sap.com<mailto:volker.simonis at sap.com>>, "ppc-aix-port-dev at openjdk.java.net<mailto:ppc-aix-port-dev at openjdk.java.net>" <ppc-aix-port-dev at openjdk.java.net<mailto:ppc-aix-port-dev at openjdk.java.net>>, "hotspot-dev at openjdk.java.net<mailto:hotspot-dev at openjdk.java.net>" <hotspot-dev at openjdk.java.net<mailto:hotspot-dev at openjdk.java.net>>
Date: 2016/05/17 02:29
Subject: Re: PPC64 VSX load/store instructions in stubs
________________________________



Hi Miki,

On 05/16/2016 02:53 AM, Miki M Enoki wrote:
> I also implemented VSX disjoint long arraycopy.
> I appreciate it if it is applied to OpenJDK, too.

Thanks for the summarized information, this is helpful. Based on your plot, I
understand we can split the whole scenario in two:

 * Array size smaller than 4k, and then use VSX instructions to perform copy
 * Array size bigger than 4k, and then use VMX instructions to perform copy

The same mechanism could be used to copy arrays of short elements, as Gustavo was
working on. Do you agree?

That said, I understand that a new patch should be generated that contemplates
both cases on a single patch, ready to be applied on OpenJDK 9 source code. Hence
a webrev should be generated mapping to bug id
https://bugs.openjdk.java.net/browse/JDK-8154156

If you need any help on the webrev[1] creation and hosting, Gustavo might help,
since he did this process already.

[1] http://openjdk.java.net/guide/webrevHelp.html

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/ppc-aix-port-dev/attachments/20160530/d0fdf85b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 105 bytes
Desc: image001.gif
URL: <http://mail.openjdk.java.net/pipermail/ppc-aix-port-dev/attachments/20160530/d0fdf85b/image001-0001.gif>


More information about the ppc-aix-port-dev mailing list