(XS) RFR: 8056183: os::is_MP() always reports true when NMT is enabled

Aleksey Shipilev aleksey.shipilev at oracle.com
Tue Sep 9 08:30:53 UTC 2014


On 09/09/2014 12:02 PM, David Holmes wrote:
> On 9/09/2014 5:50 PM, Aleksey Shipilev wrote:
> We can't skip atomic ops on uniprocessors. We can skip OrderAccess
> operations on uniprocessors.

Right, thanks.

>> Do we really have any dead-end problems with using atomics during the
>> bootstrap?
> 
> Not sure what you mean?

I thought there are some initialization cycles that prevent us from
using Atomics during the bootstrap. But now, reading the bug report, I
realize it is even worse.

>>> Changing this would allow is_MP to lie during this early initialization
>>> phase, without any harm being introduced. It is fragile I concede, but
>>> the initialization process overall is very fragile. I don't have a
>>> better short term solution - and I do need a short-term solution for
>>> this.
>>
>> Ok, can we return "true" from is_MP when _processor_count is not yet
>> initialized? We will sacrifice the transient performance instead of
>> sacrificing transient correctness.
> 
> Returning "true" is what got us into the current mess - that causes an
> incorrect stub to be generated (you can see the bug for details).

Awwwww... What a mess indeed.

> However, yes I can turn this around and have is_MP return true if
> _processor_count==0; and I can then modify the bootstrap routine on the
> platforms with the problem to skip installing the stub when it sees a
> zero count. So is_MP will still tell lies but now only the platforms
> that can't handle MP have to deal with it.

Yes, but now that's a white lie, which is better :)

-Aleksey.




More information about the hotspot-runtime-dev mailing list