PPC64 VSX load/store instructions in stubs

Gustavo Romero gromero at linux.vnet.ibm.com
Tue May 31 12:57:14 UTC 2016


Hi Martin!

Thanks for creating a new BugID.

Regards,
Gustavo

On 31-05-2016 07:17, Doerr, Martin wrote:
> Hello everybody,
> 
> I have created a new bug: JDK-8158232
> 
> We will need a webrev and a request for review mail to hotspot-dev:
> "RFR(M): 8158232: PPC64: improve byte, int and long array copy stubs by using VSX instructions"
> 
> Thanks and best regards,
> Martin
> 
> -----Original Message-----
> From: Gustavo Romero [mailto:gromero at linux.vnet.ibm.com] 
> Sent: Dienstag, 31. Mai 2016 03:50
> To: Doerr, Martin <martin.doerr at sap.com>; Michihiro Horie <HORIE at jp.ibm.com>; Miki M Enoki <ENOMIKI at jp.ibm.com>
> Cc: Breno Leitao <brenohl at br.ibm.com>; hotspot-dev at openjdk.java.net; ppc-aix-port-dev at openjdk.java.net; Simonis, Volker <volker.simonis at sap.com>; Volker Simonis <volker.simonis at gmail.com>; Breno Leitao <brenohl at br.ibm.com>
> Subject: Re: PPC64 VSX load/store instructions in stubs
> 
> Hi Michihiro
> 
> Thanks a lot for providing a result summary for byte, short, int, and
> long.
> 
> Using VSR0, 1, 2, and 3 (instead of the VR registers) will not violate
> the ABI, so you can use them as Martin suggested.
> 
> Martin, should we use the same BugID (8154156: https://goo.gl/z2eGLi)
> for byte, short, int, and long webrevs or open a new one?
> 
> Thank you.
> 
> Best regards,
> Gustavo
> 
> On 30-05-2016 06:56, Doerr, Martin wrote:
>> 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
>>
>>
> 



More information about the hotspot-dev mailing list