Re: [10] RFR(S): 8185572: Enable AssumeMP by default on SPARC machines

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [10] RFR(S): 8185572: Enable AssumeMP by default on SPARC machines

Vladimir Kozlov
CCing to Runtime.

Can you add comment explaining why it set to true on SPARC?

Thanks,
Vladimir

On 8/10/17 6:26 AM, Poonam Parhar wrote:

> Hello,
>
> Please review this simple patch:
>
> Bug:_JDK-8185572_<https://bugs.openjdk.java.net/browse/JDK-8185572>:Enable
> AssumeMP by default on SPARC machines
>
> Webrev:http://cr.openjdk.java.net/~poonam/8185572/webrev.00/
>
> This change enables AssumeMP by default on SPARC machines. On Sparc T7,
> to finalize BIS instructions the server compiler needs toadd
> a‘membar’instruction at the end.But the generation of‘membar’is guarded
> byos::is_MP(), andos::is_MP()returns false when there isa singlecpu
> available on the system. Now,invirtualized/containerenvironments, the
> number ofprocessorsallocated to a virtual machine can dynamically change
> during the application runtime.That could lead to incorrect generation
> of BIS instructions and can cause JVM crashes.Enabling AssumeMP makes
> is_MP() always return true on SPARC systems.
>
> In future, we may consider makinggeneration of‘membar‘unconditional
> withtheenhancementrequest:_JDK-8150715_<https://bugs.openjdk.java.net/browse/JDK-8150715>.
>
> Thanks,
>
> Poonam
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: [10] RFR(S): 8185572: Enable AssumeMP by default on SPARC machines

Poonam Parhar
Thanks Vladimir.

Since the SPARC machines are always multi-cores, we can safely set AssumeMP to true on these.

Adding my comments from the previous mail here again for better readability:
-------------------------------------
Bug: https://bugs.openjdk.java.net/browse/JDK-8185572: Enable AssumeMP by default on SPARC machines
Webrev: http://cr.openjdk.java.net/~poonam/8185572/webrev.00/

This change enables AssumeMP by default on SPARC machines. On Sparc T7, to finalize BIS instructions the server compiler needs to add a 'membar' instruction at the end. But the generation of 'membar' is guarded by os::is_MP(), and os::is_MP() returns false when there is a single cpu available on the system. Now, in virtualized/container environments, the number of processors allocated to a virtual machine can dynamically change during the application runtime. That could lead to incorrect generation of BIS instructions and can cause JVM crashes. Enabling AssumeMP makes is_MP() always return true on SPARC systems.

In future, we may consider making generation of 'membar' unconditional with the enhancement request: https://bugs.openjdk.java.net/browse/JDK-8150715.

Thanks,
Poonam


> -----Original Message-----
> From: Vladimir Kozlov
> Sent: Thursday, August 10, 2017 9:47 AM
> To: Poonam Parhar; [hidden email]
> Cc: [hidden email] runtime
> Subject: Re: [10] RFR(S): 8185572: Enable AssumeMP by default on SPARC
> machines
>
> CCing to Runtime.
>
> Can you add comment explaining why it set to true on SPARC?
>
> Thanks,
> Vladimir
>
> On 8/10/17 6:26 AM, Poonam Parhar wrote:
> > Hello,
> >
> > Please review this simple patch:
> >
> > Bug:_JDK-8185572_<https://bugs.openjdk.java.net/browse/JDK-
> 8185572>:En
> > able
> > AssumeMP by default on SPARC machines
> >
> > Webrev:http://cr.openjdk.java.net/~poonam/8185572/webrev.00/
> >
> > This change enables AssumeMP by default on SPARC machines. On Sparc
> > T7, to finalize BIS instructions the server compiler needs toadd
> > a'membar'instruction at the end.But the generation of'membar'is
> > guarded byos::is_MP(), andos::is_MP()returns false when there isa
> > singlecpu available on the system.
> > Now,invirtualized/containerenvironments, the number
> > ofprocessorsallocated to a virtual machine can dynamically change
> > during the application runtime.That could lead to incorrect
> generation
> > of BIS instructions and can cause JVM crashes.Enabling AssumeMP makes
> > is_MP() always return true on SPARC systems.
> >
> > In future, we may consider makinggeneration of'membar'unconditional
> > withtheenhancementrequest:_JDK-
> 8150715_<https://bugs.openjdk.java.net/browse/JDK-8150715>.
> >
> > Thanks,
> >
> > Poonam
> >
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [10] RFR(S): 8185572: Enable AssumeMP by default on SPARC machines

Vladimir Kozlov
Poonam,

I mean to add a small (one or two sentences) comment to the code. Some
thing like next but may better wording:

+  if (FLAG_IS_DEFAULT(AssumeMP)) {
+    // BIS instructions require 'membar' instruction regardless number
of CPU.
+    // Otherwise in virtualized/container environments which use only 1
cpu BIS instructions may produce incorrect results.
+    FLAG_SET_DEFAULT(AssumeMP, true);

Thanks,
Vladimir

On 8/10/17 10:44 AM, Poonam Parhar wrote:

> Thanks Vladimir.
>
> Since the SPARC machines are always multi-cores, we can safely set AssumeMP to true on these.
>
> Adding my comments from the previous mail here again for better readability:
> -------------------------------------
> Bug: https://bugs.openjdk.java.net/browse/JDK-8185572: Enable AssumeMP by default on SPARC machines
> Webrev: http://cr.openjdk.java.net/~poonam/8185572/webrev.00/
>
> This change enables AssumeMP by default on SPARC machines. On Sparc T7, to finalize BIS instructions the server compiler needs to add a 'membar' instruction at the end. But the generation of 'membar' is guarded by os::is_MP(), and os::is_MP() returns false when there is a single cpu available on the system. Now, in virtualized/container environments, the number of processors allocated to a virtual machine can dynamically change during the application runtime. That could lead to incorrect generation of BIS instructions and can cause JVM crashes. Enabling AssumeMP makes is_MP() always return true on SPARC systems.
>
> In future, we may consider making generation of 'membar' unconditional with the enhancement request: https://bugs.openjdk.java.net/browse/JDK-8150715.
>
> Thanks,
> Poonam
>
>
>> -----Original Message-----
>> From: Vladimir Kozlov
>> Sent: Thursday, August 10, 2017 9:47 AM
>> To: Poonam Parhar; [hidden email]
>> Cc: [hidden email] runtime
>> Subject: Re: [10] RFR(S): 8185572: Enable AssumeMP by default on SPARC
>> machines
>>
>> CCing to Runtime.
>>
>> Can you add comment explaining why it set to true on SPARC?
>>
>> Thanks,
>> Vladimir
>>
>> On 8/10/17 6:26 AM, Poonam Parhar wrote:
>>> Hello,
>>>
>>> Please review this simple patch:
>>>
>>> Bug:_JDK-8185572_<https://bugs.openjdk.java.net/browse/JDK-
>> 8185572>:En
>>> able
>>> AssumeMP by default on SPARC machines
>>>
>>> Webrev:http://cr.openjdk.java.net/~poonam/8185572/webrev.00/
>>>
>>> This change enables AssumeMP by default on SPARC machines. On Sparc
>>> T7, to finalize BIS instructions the server compiler needs toadd
>>> a'membar'instruction at the end.But the generation of'membar'is
>>> guarded byos::is_MP(), andos::is_MP()returns false when there isa
>>> singlecpu available on the system.
>>> Now,invirtualized/containerenvironments, the number
>>> ofprocessorsallocated to a virtual machine can dynamically change
>>> during the application runtime.That could lead to incorrect
>> generation
>>> of BIS instructions and can cause JVM crashes.Enabling AssumeMP makes
>>> is_MP() always return true on SPARC systems.
>>>
>>> In future, we may consider makinggeneration of'membar'unconditional
>>> withtheenhancementrequest:_JDK-
>> 8150715_<https://bugs.openjdk.java.net/browse/JDK-8150715>.
>>>
>>> Thanks,
>>>
>>> Poonam
>>>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [10] RFR(S): 8185572: Enable AssumeMP by default on SPARC machines

Bob Vandette
Can we just always run with AssumeMP true for all platforms these days?
Surely single CPU systems are rare now.

We might have issues with Docker containers that have a limit 1 CPU
on a large mp system which may cause issues.

Bob.


> On Aug 10, 2017, at 2:23 PM, Vladimir Kozlov <[hidden email]> wrote:
>
> Poonam,
>
> I mean to add a small (one or two sentences) comment to the code. Some thing like next but may better wording:
>
> +  if (FLAG_IS_DEFAULT(AssumeMP)) {
> +    // BIS instructions require 'membar' instruction regardless number of CPU.
> +    // Otherwise in virtualized/container environments which use only 1 cpu BIS instructions may produce incorrect results.
> +    FLAG_SET_DEFAULT(AssumeMP, true);
>
> Thanks,
> Vladimir
>
> On 8/10/17 10:44 AM, Poonam Parhar wrote:
>> Thanks Vladimir.
>> Since the SPARC machines are always multi-cores, we can safely set AssumeMP to true on these.
>> Adding my comments from the previous mail here again for better readability:
>> -------------------------------------
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8185572: Enable AssumeMP by default on SPARC machines
>> Webrev: http://cr.openjdk.java.net/~poonam/8185572/webrev.00/
>> This change enables AssumeMP by default on SPARC machines. On Sparc T7, to finalize BIS instructions the server compiler needs to add a 'membar' instruction at the end. But the generation of 'membar' is guarded by os::is_MP(), and os::is_MP() returns false when there is a single cpu available on the system. Now, in virtualized/container environments, the number of processors allocated to a virtual machine can dynamically change during the application runtime. That could lead to incorrect generation of BIS instructions and can cause JVM crashes. Enabling AssumeMP makes is_MP() always return true on SPARC systems.
>> In future, we may consider making generation of 'membar' unconditional with the enhancement request: https://bugs.openjdk.java.net/browse/JDK-8150715.
>> Thanks,
>> Poonam
>>> -----Original Message-----
>>> From: Vladimir Kozlov
>>> Sent: Thursday, August 10, 2017 9:47 AM
>>> To: Poonam Parhar; [hidden email]
>>> Cc: [hidden email] runtime
>>> Subject: Re: [10] RFR(S): 8185572: Enable AssumeMP by default on SPARC
>>> machines
>>>
>>> CCing to Runtime.
>>>
>>> Can you add comment explaining why it set to true on SPARC?
>>>
>>> Thanks,
>>> Vladimir
>>>
>>> On 8/10/17 6:26 AM, Poonam Parhar wrote:
>>>> Hello,
>>>>
>>>> Please review this simple patch:
>>>>
>>>> Bug:_JDK-8185572_<https://bugs.openjdk.java.net/browse/JDK-
>>> 8185572>:En
>>>> able
>>>> AssumeMP by default on SPARC machines
>>>>
>>>> Webrev:http://cr.openjdk.java.net/~poonam/8185572/webrev.00/
>>>>
>>>> This change enables AssumeMP by default on SPARC machines. On Sparc
>>>> T7, to finalize BIS instructions the server compiler needs toadd
>>>> a'membar'instruction at the end.But the generation of'membar'is
>>>> guarded byos::is_MP(), andos::is_MP()returns false when there isa
>>>> singlecpu available on the system.
>>>> Now,invirtualized/containerenvironments, the number
>>>> ofprocessorsallocated to a virtual machine can dynamically change
>>>> during the application runtime.That could lead to incorrect
>>> generation
>>>> of BIS instructions and can cause JVM crashes.Enabling AssumeMP makes
>>>> is_MP() always return true on SPARC systems.
>>>>
>>>> In future, we may consider makinggeneration of'membar'unconditional
>>>> withtheenhancementrequest:_JDK-
>>> 8150715_<https://bugs.openjdk.java.net/browse/JDK-8150715>.
>>>>
>>>> Thanks,
>>>>
>>>> Poonam
>>>>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: [10] RFR(S): 8185572: Enable AssumeMP by default on SPARC machines

Poonam Parhar
In reply to this post by Vladimir Kozlov
Updated the webrev with comments:
http://cr.openjdk.java.net/~poonam/8185572/webrev.01/

Thanks,
Poonam


> -----Original Message-----
> From: Vladimir Kozlov
> Sent: Thursday, August 10, 2017 11:24 AM
> To: [hidden email]; Poonam Bajaj Parhar
> Cc: [hidden email] runtime
> Subject: Re: [10] RFR(S): 8185572: Enable AssumeMP by default on SPARC
> machines
>
> Poonam,
>
> I mean to add a small (one or two sentences) comment to the code. Some
> thing like next but may better wording:
>
> +  if (FLAG_IS_DEFAULT(AssumeMP)) {
> +    // BIS instructions require 'membar' instruction regardless number
> of CPU.
> +    // Otherwise in virtualized/container environments which use only
> 1
> cpu BIS instructions may produce incorrect results.
> +    FLAG_SET_DEFAULT(AssumeMP, true);
>
> Thanks,
> Vladimir
>
> On 8/10/17 10:44 AM, Poonam Parhar wrote:
> > Thanks Vladimir.
> >
> > Since the SPARC machines are always multi-cores, we can safely set
> AssumeMP to true on these.
> >
> > Adding my comments from the previous mail here again for better
> readability:
> > -------------------------------------
> > Bug: https://bugs.openjdk.java.net/browse/JDK-8185572: Enable
> AssumeMP
> > by default on SPARC machines
> > Webrev: http://cr.openjdk.java.net/~poonam/8185572/webrev.00/
> >
> > This change enables AssumeMP by default on SPARC machines. On Sparc
> T7, to finalize BIS instructions the server compiler needs to add a
> 'membar' instruction at the end. But the generation of 'membar' is
> guarded by os::is_MP(), and os::is_MP() returns false when there is a
> single cpu available on the system. Now, in virtualized/container
> environments, the number of processors allocated to a virtual machine
> can dynamically change during the application runtime. That could lead
> to incorrect generation of BIS instructions and can cause JVM crashes.
> Enabling AssumeMP makes is_MP() always return true on SPARC systems.
> >
> > In future, we may consider making generation of 'membar'
> unconditional with the enhancement request:
> https://bugs.openjdk.java.net/browse/JDK-8150715.
> >
> > Thanks,
> > Poonam
> >
> >
> >> -----Original Message-----
> >> From: Vladimir Kozlov
> >> Sent: Thursday, August 10, 2017 9:47 AM
> >> To: Poonam Parhar; [hidden email]
> >> Cc: [hidden email] runtime
> >> Subject: Re: [10] RFR(S): 8185572: Enable AssumeMP by default on
> >> SPARC machines
> >>
> >> CCing to Runtime.
> >>
> >> Can you add comment explaining why it set to true on SPARC?
> >>
> >> Thanks,
> >> Vladimir
> >>
> >> On 8/10/17 6:26 AM, Poonam Parhar wrote:
> >>> Hello,
> >>>
> >>> Please review this simple patch:
> >>>
> >>> Bug:_JDK-8185572_<https://bugs.openjdk.java.net/browse/JDK-
> >> 8185572>:En
> >>> able
> >>> AssumeMP by default on SPARC machines
> >>>
> >>> Webrev:http://cr.openjdk.java.net/~poonam/8185572/webrev.00/
> >>>
> >>> This change enables AssumeMP by default on SPARC machines. On Sparc
> >>> T7, to finalize BIS instructions the server compiler needs toadd
> >>> a'membar'instruction at the end.But the generation of'membar'is
> >>> guarded byos::is_MP(), andos::is_MP()returns false when there isa
> >>> singlecpu available on the system.
> >>> Now,invirtualized/containerenvironments, the number
> >>> ofprocessorsallocated to a virtual machine can dynamically change
> >>> during the application runtime.That could lead to incorrect
> >> generation
> >>> of BIS instructions and can cause JVM crashes.Enabling AssumeMP
> >>> makes
> >>> is_MP() always return true on SPARC systems.
> >>>
> >>> In future, we may consider makinggeneration of'membar'unconditional
> >>> withtheenhancementrequest:_JDK-
> >> 8150715_<https://bugs.openjdk.java.net/browse/JDK-8150715>.
> >>>
> >>> Thanks,
> >>>
> >>> Poonam
> >>>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [10] RFR(S): 8185572: Enable AssumeMP by default on SPARC machines

Vladimir Kozlov
In reply to this post by Bob Vandette
Bob, we have JDK-8185062 for that:

https://bugs.openjdk.java.net/browse/JDK-8185062

IMHO this fix is intended for backports, should be simple and don't
cause regression, for example on embedded platforms.

But I am fine if runtime group think it is fine to enable it on all
platforms in jdk 7, 8 and 9.

I agree that due to problem with dynamic cpus configuration in
containers it may be good to enable it on all platforms in previous
releases too.

Thanks,
Vladimir

On 8/10/17 11:53 AM, Bob Vandette wrote:

> Can we just always run with AssumeMP true for all platforms these days?
> Surely single CPU systems are rare now.
>
> We might have issues with Docker containers that have a limit 1 CPU
> on a large mp system which may cause issues.
>
> Bob.
>
>
>> On Aug 10, 2017, at 2:23 PM, Vladimir Kozlov <[hidden email]> wrote:
>>
>> Poonam,
>>
>> I mean to add a small (one or two sentences) comment to the code. Some thing like next but may better wording:
>>
>> +  if (FLAG_IS_DEFAULT(AssumeMP)) {
>> +    // BIS instructions require 'membar' instruction regardless number of CPU.
>> +    // Otherwise in virtualized/container environments which use only 1 cpu BIS instructions may produce incorrect results.
>> +    FLAG_SET_DEFAULT(AssumeMP, true);
>>
>> Thanks,
>> Vladimir
>>
>> On 8/10/17 10:44 AM, Poonam Parhar wrote:
>>> Thanks Vladimir.
>>> Since the SPARC machines are always multi-cores, we can safely set AssumeMP to true on these.
>>> Adding my comments from the previous mail here again for better readability:
>>> -------------------------------------
>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8185572: Enable AssumeMP by default on SPARC machines
>>> Webrev: http://cr.openjdk.java.net/~poonam/8185572/webrev.00/
>>> This change enables AssumeMP by default on SPARC machines. On Sparc T7, to finalize BIS instructions the server compiler needs to add a 'membar' instruction at the end. But the generation of 'membar' is guarded by os::is_MP(), and os::is_MP() returns false when there is a single cpu available on the system. Now, in virtualized/container environments, the number of processors allocated to a virtual machine can dynamically change during the application runtime. That could lead to incorrect generation of BIS instructions and can cause JVM crashes. Enabling AssumeMP makes is_MP() always return true on SPARC systems.
>>> In future, we may consider making generation of 'membar' unconditional with the enhancement request: https://bugs.openjdk.java.net/browse/JDK-8150715.
>>> Thanks,
>>> Poonam
>>>> -----Original Message-----
>>>> From: Vladimir Kozlov
>>>> Sent: Thursday, August 10, 2017 9:47 AM
>>>> To: Poonam Parhar; [hidden email]
>>>> Cc: [hidden email] runtime
>>>> Subject: Re: [10] RFR(S): 8185572: Enable AssumeMP by default on SPARC
>>>> machines
>>>>
>>>> CCing to Runtime.
>>>>
>>>> Can you add comment explaining why it set to true on SPARC?
>>>>
>>>> Thanks,
>>>> Vladimir
>>>>
>>>> On 8/10/17 6:26 AM, Poonam Parhar wrote:
>>>>> Hello,
>>>>>
>>>>> Please review this simple patch:
>>>>>
>>>>> Bug:_JDK-8185572_<https://bugs.openjdk.java.net/browse/JDK-
>>>> 8185572>:En
>>>>> able
>>>>> AssumeMP by default on SPARC machines
>>>>>
>>>>> Webrev:http://cr.openjdk.java.net/~poonam/8185572/webrev.00/
>>>>>
>>>>> This change enables AssumeMP by default on SPARC machines. On Sparc
>>>>> T7, to finalize BIS instructions the server compiler needs toadd
>>>>> a'membar'instruction at the end.But the generation of'membar'is
>>>>> guarded byos::is_MP(), andos::is_MP()returns false when there isa
>>>>> singlecpu available on the system.
>>>>> Now,invirtualized/containerenvironments, the number
>>>>> ofprocessorsallocated to a virtual machine can dynamically change
>>>>> during the application runtime.That could lead to incorrect
>>>> generation
>>>>> of BIS instructions and can cause JVM crashes.Enabling AssumeMP makes
>>>>> is_MP() always return true on SPARC systems.
>>>>>
>>>>> In future, we may consider makinggeneration of'membar'unconditional
>>>>> withtheenhancementrequest:_JDK-
>>>> 8150715_<https://bugs.openjdk.java.net/browse/JDK-8150715>.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Poonam
>>>>>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [10] RFR(S): 8185572: Enable AssumeMP by default on SPARC machines

Vladimir Kozlov
In reply to this post by Poonam Parhar
Looks good. I think someone from Runtime have to review it too.

Thanks,
Vladimir

On 8/10/17 11:55 AM, Poonam Parhar wrote:

> Updated the webrev with comments:
> http://cr.openjdk.java.net/~poonam/8185572/webrev.01/
>
> Thanks,
> Poonam
>
>
>> -----Original Message-----
>> From: Vladimir Kozlov
>> Sent: Thursday, August 10, 2017 11:24 AM
>> To: [hidden email]; Poonam Bajaj Parhar
>> Cc: [hidden email] runtime
>> Subject: Re: [10] RFR(S): 8185572: Enable AssumeMP by default on SPARC
>> machines
>>
>> Poonam,
>>
>> I mean to add a small (one or two sentences) comment to the code. Some
>> thing like next but may better wording:
>>
>> +  if (FLAG_IS_DEFAULT(AssumeMP)) {
>> +    // BIS instructions require 'membar' instruction regardless number
>> of CPU.
>> +    // Otherwise in virtualized/container environments which use only
>> 1
>> cpu BIS instructions may produce incorrect results.
>> +    FLAG_SET_DEFAULT(AssumeMP, true);
>>
>> Thanks,
>> Vladimir
>>
>> On 8/10/17 10:44 AM, Poonam Parhar wrote:
>>> Thanks Vladimir.
>>>
>>> Since the SPARC machines are always multi-cores, we can safely set
>> AssumeMP to true on these.
>>>
>>> Adding my comments from the previous mail here again for better
>> readability:
>>> -------------------------------------
>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8185572: Enable
>> AssumeMP
>>> by default on SPARC machines
>>> Webrev: http://cr.openjdk.java.net/~poonam/8185572/webrev.00/
>>>
>>> This change enables AssumeMP by default on SPARC machines. On Sparc
>> T7, to finalize BIS instructions the server compiler needs to add a
>> 'membar' instruction at the end. But the generation of 'membar' is
>> guarded by os::is_MP(), and os::is_MP() returns false when there is a
>> single cpu available on the system. Now, in virtualized/container
>> environments, the number of processors allocated to a virtual machine
>> can dynamically change during the application runtime. That could lead
>> to incorrect generation of BIS instructions and can cause JVM crashes.
>> Enabling AssumeMP makes is_MP() always return true on SPARC systems.
>>>
>>> In future, we may consider making generation of 'membar'
>> unconditional with the enhancement request:
>> https://bugs.openjdk.java.net/browse/JDK-8150715.
>>>
>>> Thanks,
>>> Poonam
>>>
>>>
>>>> -----Original Message-----
>>>> From: Vladimir Kozlov
>>>> Sent: Thursday, August 10, 2017 9:47 AM
>>>> To: Poonam Parhar; [hidden email]
>>>> Cc: [hidden email] runtime
>>>> Subject: Re: [10] RFR(S): 8185572: Enable AssumeMP by default on
>>>> SPARC machines
>>>>
>>>> CCing to Runtime.
>>>>
>>>> Can you add comment explaining why it set to true on SPARC?
>>>>
>>>> Thanks,
>>>> Vladimir
>>>>
>>>> On 8/10/17 6:26 AM, Poonam Parhar wrote:
>>>>> Hello,
>>>>>
>>>>> Please review this simple patch:
>>>>>
>>>>> Bug:_JDK-8185572_<https://bugs.openjdk.java.net/browse/JDK-
>>>> 8185572>:En
>>>>> able
>>>>> AssumeMP by default on SPARC machines
>>>>>
>>>>> Webrev:http://cr.openjdk.java.net/~poonam/8185572/webrev.00/
>>>>>
>>>>> This change enables AssumeMP by default on SPARC machines. On Sparc
>>>>> T7, to finalize BIS instructions the server compiler needs toadd
>>>>> a'membar'instruction at the end.But the generation of'membar'is
>>>>> guarded byos::is_MP(), andos::is_MP()returns false when there isa
>>>>> singlecpu available on the system.
>>>>> Now,invirtualized/containerenvironments, the number
>>>>> ofprocessorsallocated to a virtual machine can dynamically change
>>>>> during the application runtime.That could lead to incorrect
>>>> generation
>>>>> of BIS instructions and can cause JVM crashes.Enabling AssumeMP
>>>>> makes
>>>>> is_MP() always return true on SPARC systems.
>>>>>
>>>>> In future, we may consider makinggeneration of'membar'unconditional
>>>>> withtheenhancementrequest:_JDK-
>>>> 8150715_<https://bugs.openjdk.java.net/browse/JDK-8150715>.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Poonam
>>>>>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [10] RFR(S): 8185572: Enable AssumeMP by default on SPARC machines

Bob Vandette
In reply to this post by Vladimir Kozlov
I don’t think that we should backport it to JDK 7 and 8 since older single CPU systems may
get a security update for these older releases and see a performance regression.
Perhaps JDK9 and 10 would be ok.

Bob.


> On Aug 10, 2017, at 3:10 PM, Vladimir Kozlov <[hidden email]> wrote:
>
> Bob, we have JDK-8185062 for that:
>
> https://bugs.openjdk.java.net/browse/JDK-8185062
>
> IMHO this fix is intended for backports, should be simple and don't cause regression, for example on embedded platforms.
>
> But I am fine if runtime group think it is fine to enable it on all platforms in jdk 7, 8 and 9.
>
> I agree that due to problem with dynamic cpus configuration in containers it may be good to enable it on all platforms in previous releases too.
>
> Thanks,
> Vladimir
>
> On 8/10/17 11:53 AM, Bob Vandette wrote:
>> Can we just always run with AssumeMP true for all platforms these days?
>> Surely single CPU systems are rare now.
>> We might have issues with Docker containers that have a limit 1 CPU
>> on a large mp system which may cause issues.
>> Bob.
>>> On Aug 10, 2017, at 2:23 PM, Vladimir Kozlov <[hidden email]> wrote:
>>>
>>> Poonam,
>>>
>>> I mean to add a small (one or two sentences) comment to the code. Some thing like next but may better wording:
>>>
>>> +  if (FLAG_IS_DEFAULT(AssumeMP)) {
>>> +    // BIS instructions require 'membar' instruction regardless number of CPU.
>>> +    // Otherwise in virtualized/container environments which use only 1 cpu BIS instructions may produce incorrect results.
>>> +    FLAG_SET_DEFAULT(AssumeMP, true);
>>>
>>> Thanks,
>>> Vladimir
>>>
>>> On 8/10/17 10:44 AM, Poonam Parhar wrote:
>>>> Thanks Vladimir.
>>>> Since the SPARC machines are always multi-cores, we can safely set AssumeMP to true on these.
>>>> Adding my comments from the previous mail here again for better readability:
>>>> -------------------------------------
>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8185572: Enable AssumeMP by default on SPARC machines
>>>> Webrev: http://cr.openjdk.java.net/~poonam/8185572/webrev.00/
>>>> This change enables AssumeMP by default on SPARC machines. On Sparc T7, to finalize BIS instructions the server compiler needs to add a 'membar' instruction at the end. But the generation of 'membar' is guarded by os::is_MP(), and os::is_MP() returns false when there is a single cpu available on the system. Now, in virtualized/container environments, the number of processors allocated to a virtual machine can dynamically change during the application runtime. That could lead to incorrect generation of BIS instructions and can cause JVM crashes. Enabling AssumeMP makes is_MP() always return true on SPARC systems.
>>>> In future, we may consider making generation of 'membar' unconditional with the enhancement request: https://bugs.openjdk.java.net/browse/JDK-8150715.
>>>> Thanks,
>>>> Poonam
>>>>> -----Original Message-----
>>>>> From: Vladimir Kozlov
>>>>> Sent: Thursday, August 10, 2017 9:47 AM
>>>>> To: Poonam Parhar; [hidden email]
>>>>> Cc: [hidden email] runtime
>>>>> Subject: Re: [10] RFR(S): 8185572: Enable AssumeMP by default on SPARC
>>>>> machines
>>>>>
>>>>> CCing to Runtime.
>>>>>
>>>>> Can you add comment explaining why it set to true on SPARC?
>>>>>
>>>>> Thanks,
>>>>> Vladimir
>>>>>
>>>>> On 8/10/17 6:26 AM, Poonam Parhar wrote:
>>>>>> Hello,
>>>>>>
>>>>>> Please review this simple patch:
>>>>>>
>>>>>> Bug:_JDK-8185572_<https://bugs.openjdk.java.net/browse/JDK-
>>>>> 8185572>:En
>>>>>> able
>>>>>> AssumeMP by default on SPARC machines
>>>>>>
>>>>>> Webrev:http://cr.openjdk.java.net/~poonam/8185572/webrev.00/
>>>>>>
>>>>>> This change enables AssumeMP by default on SPARC machines. On Sparc
>>>>>> T7, to finalize BIS instructions the server compiler needs toadd
>>>>>> a'membar'instruction at the end.But the generation of'membar'is
>>>>>> guarded byos::is_MP(), andos::is_MP()returns false when there isa
>>>>>> singlecpu available on the system.
>>>>>> Now,invirtualized/containerenvironments, the number
>>>>>> ofprocessorsallocated to a virtual machine can dynamically change
>>>>>> during the application runtime.That could lead to incorrect
>>>>> generation
>>>>>> of BIS instructions and can cause JVM crashes.Enabling AssumeMP makes
>>>>>> is_MP() always return true on SPARC systems.
>>>>>>
>>>>>> In future, we may consider makinggeneration of'membar'unconditional
>>>>>> withtheenhancementrequest:_JDK-
>>>>> 8150715_<https://bugs.openjdk.java.net/browse/JDK-8150715>.
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Poonam
>>>>>>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [10] RFR(S): 8185572: Enable AssumeMP by default on SPARC machines

coleen.phillimore
In reply to this post by Vladimir Kozlov

This looks good.  It'll be nice when the whole thing gets cleaned up.

Coleen


On 8/10/17 3:11 PM, Vladimir Kozlov wrote:

> Looks good. I think someone from Runtime have to review it too.
>
> Thanks,
> Vladimir
>
> On 8/10/17 11:55 AM, Poonam Parhar wrote:
>> Updated the webrev with comments:
>> http://cr.openjdk.java.net/~poonam/8185572/webrev.01/
>>
>> Thanks,
>> Poonam
>>
>>
>>> -----Original Message-----
>>> From: Vladimir Kozlov
>>> Sent: Thursday, August 10, 2017 11:24 AM
>>> To: [hidden email]; Poonam Bajaj Parhar
>>> Cc: [hidden email] runtime
>>> Subject: Re: [10] RFR(S): 8185572: Enable AssumeMP by default on SPARC
>>> machines
>>>
>>> Poonam,
>>>
>>> I mean to add a small (one or two sentences) comment to the code. Some
>>> thing like next but may better wording:
>>>
>>> +  if (FLAG_IS_DEFAULT(AssumeMP)) {
>>> +    // BIS instructions require 'membar' instruction regardless number
>>> of CPU.
>>> +    // Otherwise in virtualized/container environments which use only
>>> 1
>>> cpu BIS instructions may produce incorrect results.
>>> +    FLAG_SET_DEFAULT(AssumeMP, true);
>>>
>>> Thanks,
>>> Vladimir
>>>
>>> On 8/10/17 10:44 AM, Poonam Parhar wrote:
>>>> Thanks Vladimir.
>>>>
>>>> Since the SPARC machines are always multi-cores, we can safely set
>>> AssumeMP to true on these.
>>>>
>>>> Adding my comments from the previous mail here again for better
>>> readability:
>>>> -------------------------------------
>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8185572: Enable
>>> AssumeMP
>>>> by default on SPARC machines
>>>> Webrev: http://cr.openjdk.java.net/~poonam/8185572/webrev.00/
>>>>
>>>> This change enables AssumeMP by default on SPARC machines. On Sparc
>>> T7, to finalize BIS instructions the server compiler needs to add a
>>> 'membar' instruction at the end. But the generation of 'membar' is
>>> guarded by os::is_MP(), and os::is_MP() returns false when there is a
>>> single cpu available on the system. Now, in virtualized/container
>>> environments, the number of processors allocated to a virtual machine
>>> can dynamically change during the application runtime. That could lead
>>> to incorrect generation of BIS instructions and can cause JVM crashes.
>>> Enabling AssumeMP makes is_MP() always return true on SPARC systems.
>>>>
>>>> In future, we may consider making generation of 'membar'
>>> unconditional with the enhancement request:
>>> https://bugs.openjdk.java.net/browse/JDK-8150715.
>>>>
>>>> Thanks,
>>>> Poonam
>>>>
>>>>
>>>>> -----Original Message-----
>>>>> From: Vladimir Kozlov
>>>>> Sent: Thursday, August 10, 2017 9:47 AM
>>>>> To: Poonam Parhar; [hidden email]
>>>>> Cc: [hidden email] runtime
>>>>> Subject: Re: [10] RFR(S): 8185572: Enable AssumeMP by default on
>>>>> SPARC machines
>>>>>
>>>>> CCing to Runtime.
>>>>>
>>>>> Can you add comment explaining why it set to true on SPARC?
>>>>>
>>>>> Thanks,
>>>>> Vladimir
>>>>>
>>>>> On 8/10/17 6:26 AM, Poonam Parhar wrote:
>>>>>> Hello,
>>>>>>
>>>>>> Please review this simple patch:
>>>>>>
>>>>>> Bug:_JDK-8185572_<https://bugs.openjdk.java.net/browse/JDK-
>>>>> 8185572>:En
>>>>>> able
>>>>>> AssumeMP by default on SPARC machines
>>>>>>
>>>>>> Webrev:http://cr.openjdk.java.net/~poonam/8185572/webrev.00/
>>>>>>
>>>>>> This change enables AssumeMP by default on SPARC machines. On Sparc
>>>>>> T7, to finalize BIS instructions the server compiler needs toadd
>>>>>> a'membar'instruction at the end.But the generation of'membar'is
>>>>>> guarded byos::is_MP(), andos::is_MP()returns false when there isa
>>>>>> singlecpu available on the system.
>>>>>> Now,invirtualized/containerenvironments, the number
>>>>>> ofprocessorsallocated to a virtual machine can dynamically change
>>>>>> during the application runtime.That could lead to incorrect
>>>>> generation
>>>>>> of BIS instructions and can cause JVM crashes.Enabling AssumeMP
>>>>>> makes
>>>>>> is_MP() always return true on SPARC systems.
>>>>>>
>>>>>> In future, we may consider makinggeneration of'membar'unconditional
>>>>>> withtheenhancementrequest:_JDK-
>>>>> 8150715_<https://bugs.openjdk.java.net/browse/JDK-8150715>.
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Poonam
>>>>>>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: [10] RFR(S): 8185572: Enable AssumeMP by default on SPARC machines

Poonam Parhar
In reply to this post by Bob Vandette
We have customer reports of crashes with 8u on T7 sparc systems. So the change needs to be made in 8, and possibly in 7 too.

Thanks,
Poonam

> -----Original Message-----
> From: Bob Vandette
> Sent: Thursday, August 10, 2017 12:14 PM
> To: Vladimir Kozlov
> Cc: [hidden email]; Poonam Bajaj Parhar;
> [hidden email] runtime
> Subject: Re: [10] RFR(S): 8185572: Enable AssumeMP by default on SPARC
> machines
>
> I don’t think that we should backport it to JDK 7 and 8 since older
> single CPU systems may get a security update for these older releases
> and see a performance regression.
> Perhaps JDK9 and 10 would be ok.
>
> Bob.
>
>
> > On Aug 10, 2017, at 3:10 PM, Vladimir Kozlov
> <[hidden email]> wrote:
> >
> > Bob, we have JDK-8185062 for that:
> >
> > https://bugs.openjdk.java.net/browse/JDK-8185062
> >
> > IMHO this fix is intended for backports, should be simple and don't
> cause regression, for example on embedded platforms.
> >
> > But I am fine if runtime group think it is fine to enable it on all
> platforms in jdk 7, 8 and 9.
> >
> > I agree that due to problem with dynamic cpus configuration in
> containers it may be good to enable it on all platforms in previous
> releases too.
> >
> > Thanks,
> > Vladimir
> >
> > On 8/10/17 11:53 AM, Bob Vandette wrote:
> >> Can we just always run with AssumeMP true for all platforms these
> days?
> >> Surely single CPU systems are rare now.
> >> We might have issues with Docker containers that have a limit 1 CPU
> >> on a large mp system which may cause issues.
> >> Bob.
> >>> On Aug 10, 2017, at 2:23 PM, Vladimir Kozlov
> <[hidden email]> wrote:
> >>>
> >>> Poonam,
> >>>
> >>> I mean to add a small (one or two sentences) comment to the code.
> Some thing like next but may better wording:
> >>>
> >>> +  if (FLAG_IS_DEFAULT(AssumeMP)) {
> >>> +    // BIS instructions require 'membar' instruction regardless
> number of CPU.
> >>> +    // Otherwise in virtualized/container environments which use
> only 1 cpu BIS instructions may produce incorrect results.
> >>> +    FLAG_SET_DEFAULT(AssumeMP, true);
> >>>
> >>> Thanks,
> >>> Vladimir
> >>>
> >>> On 8/10/17 10:44 AM, Poonam Parhar wrote:
> >>>> Thanks Vladimir.
> >>>> Since the SPARC machines are always multi-cores, we can safely set
> AssumeMP to true on these.
> >>>> Adding my comments from the previous mail here again for better
> readability:
> >>>> -------------------------------------
> >>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8185572: Enable
> >>>> AssumeMP by default on SPARC machines
> >>>> Webrev: http://cr.openjdk.java.net/~poonam/8185572/webrev.00/
> >>>> This change enables AssumeMP by default on SPARC machines. On
> Sparc T7, to finalize BIS instructions the server compiler needs to add
> a 'membar' instruction at the end. But the generation of 'membar' is
> guarded by os::is_MP(), and os::is_MP() returns false when there is a
> single cpu available on the system. Now, in virtualized/container
> environments, the number of processors allocated to a virtual machine
> can dynamically change during the application runtime. That could lead
> to incorrect generation of BIS instructions and can cause JVM crashes.
> Enabling AssumeMP makes is_MP() always return true on SPARC systems.
> >>>> In future, we may consider making generation of 'membar'
> unconditional with the enhancement request:
> https://bugs.openjdk.java.net/browse/JDK-8150715.
> >>>> Thanks,
> >>>> Poonam
> >>>>> -----Original Message-----
> >>>>> From: Vladimir Kozlov
> >>>>> Sent: Thursday, August 10, 2017 9:47 AM
> >>>>> To: Poonam Parhar; [hidden email]
> >>>>> Cc: [hidden email] runtime
> >>>>> Subject: Re: [10] RFR(S): 8185572: Enable AssumeMP by default on
> >>>>> SPARC machines
> >>>>>
> >>>>> CCing to Runtime.
> >>>>>
> >>>>> Can you add comment explaining why it set to true on SPARC?
> >>>>>
> >>>>> Thanks,
> >>>>> Vladimir
> >>>>>
> >>>>> On 8/10/17 6:26 AM, Poonam Parhar wrote:
> >>>>>> Hello,
> >>>>>>
> >>>>>> Please review this simple patch:
> >>>>>>
> >>>>>> Bug:_JDK-8185572_<https://bugs.openjdk.java.net/browse/JDK-
> >>>>> 8185572>:En
> >>>>>> able
> >>>>>> AssumeMP by default on SPARC machines
> >>>>>>
> >>>>>> Webrev:http://cr.openjdk.java.net/~poonam/8185572/webrev.00/
> >>>>>>
> >>>>>> This change enables AssumeMP by default on SPARC machines. On
> >>>>>> Sparc T7, to finalize BIS instructions the server compiler needs
> >>>>>> toadd a'membar'instruction at the end.But the generation
> >>>>>> of'membar'is guarded byos::is_MP(), andos::is_MP()returns false
> >>>>>> when there isa singlecpu available on the system.
> >>>>>> Now,invirtualized/containerenvironments, the number
> >>>>>> ofprocessorsallocated to a virtual machine can dynamically
> change
> >>>>>> during the application runtime.That could lead to incorrect
> >>>>> generation
> >>>>>> of BIS instructions and can cause JVM crashes.Enabling AssumeMP
> >>>>>> makes
> >>>>>> is_MP() always return true on SPARC systems.
> >>>>>>
> >>>>>> In future, we may consider makinggeneration
> >>>>>> of'membar'unconditional
> >>>>>> withtheenhancementrequest:_JDK-
> >>>>> 8150715_<https://bugs.openjdk.java.net/browse/JDK-8150715>.
> >>>>>>
> >>>>>> Thanks,
> >>>>>>
> >>>>>> Poonam
> >>>>>>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [10] RFR(S): 8185572: Enable AssumeMP by default on SPARC machines

David Holmes
In reply to this post by Poonam Parhar
Hi Poonam,

On 11/08/2017 3:44 AM, Poonam Parhar wrote:
> Thanks Vladimir.
>
> Since the SPARC machines are always multi-cores, we can safely set AssumeMP to true on these.

I'm still unclear about the reported problem here. As Vladimir pointed
out in the bug report the is_MP checks uses _processor_count which is
set to the number of cpus on the machine _not_ the number of cpus
currently available to the VM.

void os::Solaris::initialize_system_info() {
   set_processor_count(sysconf(_SC_NPROCESSORS_CONF));

So all this discussion about containers and dynamic changes to available
cpus should be moot. So the only way this can fail is if the number of
configured processors on the machine dynamically changed _and_ it was
initially 1 - which seems to me to be impossible with sparc unless the
hardware info is being incorrectly reported (ie virtualization bug?)

That aside I have no issue with the fix as we will likely be assuming MP
always in the future.

Thanks,
David

> Adding my comments from the previous mail here again for better readability:
> -------------------------------------
> Bug: https://bugs.openjdk.java.net/browse/JDK-8185572: Enable AssumeMP by default on SPARC machines
> Webrev: http://cr.openjdk.java.net/~poonam/8185572/webrev.00/
>
> This change enables AssumeMP by default on SPARC machines. On Sparc T7, to finalize BIS instructions the server compiler needs to add a 'membar' instruction at the end. But the generation of 'membar' is guarded by os::is_MP(), and os::is_MP() returns false when there is a single cpu available on the system. Now, in virtualized/container environments, the number of processors allocated to a virtual machine can dynamically change during the application runtime. That could lead to incorrect generation of BIS instructions and can cause JVM crashes. Enabling AssumeMP makes is_MP() always return true on SPARC systems.
>
> In future, we may consider making generation of 'membar' unconditional with the enhancement request: https://bugs.openjdk.java.net/browse/JDK-8150715.
>
> Thanks,
> Poonam
>
>
>> -----Original Message-----
>> From: Vladimir Kozlov
>> Sent: Thursday, August 10, 2017 9:47 AM
>> To: Poonam Parhar; [hidden email]
>> Cc: [hidden email] runtime
>> Subject: Re: [10] RFR(S): 8185572: Enable AssumeMP by default on SPARC
>> machines
>>
>> CCing to Runtime.
>>
>> Can you add comment explaining why it set to true on SPARC?
>>
>> Thanks,
>> Vladimir
>>
>> On 8/10/17 6:26 AM, Poonam Parhar wrote:
>>> Hello,
>>>
>>> Please review this simple patch:
>>>
>>> Bug:_JDK-8185572_<https://bugs.openjdk.java.net/browse/JDK-
>> 8185572>:En
>>> able
>>> AssumeMP by default on SPARC machines
>>>
>>> Webrev:http://cr.openjdk.java.net/~poonam/8185572/webrev.00/
>>>
>>> This change enables AssumeMP by default on SPARC machines. On Sparc
>>> T7, to finalize BIS instructions the server compiler needs toadd
>>> a'membar'instruction at the end.But the generation of'membar'is
>>> guarded byos::is_MP(), andos::is_MP()returns false when there isa
>>> singlecpu available on the system.
>>> Now,invirtualized/containerenvironments, the number
>>> ofprocessorsallocated to a virtual machine can dynamically change
>>> during the application runtime.That could lead to incorrect
>> generation
>>> of BIS instructions and can cause JVM crashes.Enabling AssumeMP makes
>>> is_MP() always return true on SPARC systems.
>>>
>>> In future, we may consider makinggeneration of'membar'unconditional
>>> withtheenhancementrequest:_JDK-
>> 8150715_<https://bugs.openjdk.java.net/browse/JDK-8150715>.
>>>
>>> Thanks,
>>>
>>> Poonam
>>>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [10] RFR(S): 8185572: Enable AssumeMP by default on SPARC machines

David Holmes
On 11/08/2017 7:57 AM, David Holmes wrote:

> Hi Poonam,
>
> On 11/08/2017 3:44 AM, Poonam Parhar wrote:
>> Thanks Vladimir.
>>
>> Since the SPARC machines are always multi-cores, we can safely set
>> AssumeMP to true on these.
>
> I'm still unclear about the reported problem here. As Vladimir pointed
> out in the bug report the is_MP checks uses _processor_count which is
> set to the number of cpus on the machine _not_ the number of cpus
> currently available to the VM.
>
> void os::Solaris::initialize_system_info() {
>    set_processor_count(sysconf(_SC_NPROCESSORS_CONF));
>
> So all this discussion about containers and dynamic changes to available
> cpus should be moot. So the only way this can fail is if the number of
> configured processors on the machine dynamically changed _and_ it was
> initially 1 - which seems to me to be impossible with sparc unless the
> hardware info is being incorrectly reported (ie virtualization bug?)

No it isn't impossible as a LDOM can be configured with 1 "cpu", and 1
is what sysconf(_SC_NPROCESSORS_CONF) will return.

A change to the number of cpus is not the issue here, but the simple
fact that the BIS instructions have to have a membar issued, and that is
elided when there is only 1 processor - unless AssumeMP is set true.

Sorry for the noise.

David

> That aside I have no issue with the fix as we will likely be assuming MP
> always in the future.
>
> Thanks,
> David
>
>> Adding my comments from the previous mail here again for better
>> readability:
>> -------------------------------------
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8185572: Enable AssumeMP
>> by default on SPARC machines
>> Webrev: http://cr.openjdk.java.net/~poonam/8185572/webrev.00/
>>
>> This change enables AssumeMP by default on SPARC machines. On Sparc
>> T7, to finalize BIS instructions the server compiler needs to add a
>> 'membar' instruction at the end. But the generation of 'membar' is
>> guarded by os::is_MP(), and os::is_MP() returns false when there is a
>> single cpu available on the system. Now, in virtualized/container
>> environments, the number of processors allocated to a virtual machine
>> can dynamically change during the application runtime. That could lead
>> to incorrect generation of BIS instructions and can cause JVM crashes.
>> Enabling AssumeMP makes is_MP() always return true on SPARC systems.
>>
>> In future, we may consider making generation of 'membar' unconditional
>> with the enhancement request:
>> https://bugs.openjdk.java.net/browse/JDK-8150715.
>>
>> Thanks,
>> Poonam
>>
>>
>>> -----Original Message-----
>>> From: Vladimir Kozlov
>>> Sent: Thursday, August 10, 2017 9:47 AM
>>> To: Poonam Parhar; [hidden email]
>>> Cc: [hidden email] runtime
>>> Subject: Re: [10] RFR(S): 8185572: Enable AssumeMP by default on SPARC
>>> machines
>>>
>>> CCing to Runtime.
>>>
>>> Can you add comment explaining why it set to true on SPARC?
>>>
>>> Thanks,
>>> Vladimir
>>>
>>> On 8/10/17 6:26 AM, Poonam Parhar wrote:
>>>> Hello,
>>>>
>>>> Please review this simple patch:
>>>>
>>>> Bug:_JDK-8185572_<https://bugs.openjdk.java.net/browse/JDK-
>>> 8185572>:En
>>>> able
>>>> AssumeMP by default on SPARC machines
>>>>
>>>> Webrev:http://cr.openjdk.java.net/~poonam/8185572/webrev.00/
>>>>
>>>> This change enables AssumeMP by default on SPARC machines. On Sparc
>>>> T7, to finalize BIS instructions the server compiler needs toadd
>>>> a'membar'instruction at the end.But the generation of'membar'is
>>>> guarded byos::is_MP(), andos::is_MP()returns false when there isa
>>>> singlecpu available on the system.
>>>> Now,invirtualized/containerenvironments, the number
>>>> ofprocessorsallocated to a virtual machine can dynamically change
>>>> during the application runtime.That could lead to incorrect
>>> generation
>>>> of BIS instructions and can cause JVM crashes.Enabling AssumeMP makes
>>>> is_MP() always return true on SPARC systems.
>>>>
>>>> In future, we may consider makinggeneration of'membar'unconditional
>>>> withtheenhancementrequest:_JDK-
>>> 8150715_<https://bugs.openjdk.java.net/browse/JDK-8150715>.
>>>>
>>>> Thanks,
>>>>
>>>> Poonam
>>>>
Loading...