RFR: 5049299 - (process) Use,posix_spawn, not fork, on S10 to avoid swap,exhaustion (jdk7u-dev)
Rob McKenna
rob.mckenna at oracle.com
Fri Nov 8 12:46:08 UTC 2013
vfork was the default in Linux before 5049299. You can see the variable
START_CHILD_USE_VFORK being set in:
http://cr.openjdk.java.net/~robm/5049299/webrev.06/src/solaris/native/java/lang/UNIXProcess_md.c.cdiff.html
-Rob
On 08/11/13 00:39, David Holmes wrote:
> On 7/11/2013 11:53 PM, Rob McKenna wrote:
>> Ah, thanks for catching that David, I've updated the webrev in place.
>>
>> I believe the reasoning is that we want to minimise any potential impact
>> to customers running in production. The general feeling seems to be that
>> Mac is a development platform and is less likely to cause us problems in
>> that regard. (not that I would anticipate any on Solaris, but I
>> understand the desire to be conservative)
>
> And linux? It has changed to vfork right?
>
> So OSX has changed, linux has changed, but Solaris remains as-is. All
> platforms allow selecting the mechanism via the property
> jdk.lang.Process.launchMechanism
>
> Thanks,
> David
>
>> -Rob
>>
>> On 07/11/13 01:51, David Holmes wrote:
>>> On 6/11/2013 10:00 PM, Rob McKenna wrote:
>>>> Hi David,
>>>>
>>>> The only difference in 5049299 is the change in the default property
>>>> value in Solaris. Apologies for not making that clear.
>>>
>>> Given this was primarily aimed at Solaris in the first place it seems
>>> strange to me to not make the change on Solaris. If this is considered
>>> risky fr an update release then I would think that applies to all
>>> platforms equally. ??
>>>
>>> If Solaris is not in fact changing then the comment in
>>> src/solaris/native/java/lang/UNIXProcess_md.c needs to be altered:
>>>
>>> * Based on the above analysis, we are currently using vfork() on
>>> ! * Linux and spawn() on other Unix systems, but the code to use
>>> clone()
>>> ! * and fork() remains.
>>>
>>> David
>>> -----
>>>
>>>> -Rob
>>>>
>>>> On 06/11/13 01:09, David Holmes wrote:
>>>>> Hi Rob,
>>>>>
>>>>> How different is this to the JDK 8 version?
>>>>>
>>>>> Thanks,
>>>>> David
>>>>>
>>>>> On 6/11/2013 7:24 AM, Rob McKenna wrote:
>>>>>> ..
>>>>>>
>>>>>> http://cr.openjdk.java.net/~robm/5049299/7/webrev.01/
>>>>>>
>>>>>> -Rob
>>>>>>
>>>>>> On 05/11/13 21:23, Rob McKenna wrote:
>>>>>>> Hi folks,
>>>>>>>
>>>>>>> I'd like to backport this change to JDK7. Note: this fix uses
>>>>>>> posix_spawn by default on Mac OSX only. On Solaris fork will remain
>>>>>>> the default behaviour.
>>>>>>>
>>>>>>> I've just noticed that there is a problem with the testcase on
>>>>>>> Solaris
>>>>>>> in that it will test fork twice. (and won't test posix_spawn) I'll
>>>>>>> figure out a way around this, but in the mean time I'd like to get
>>>>>>> the
>>>>>>> ball rolling on this review anyway.
>>>>>>>
>>>>>>> -Rob
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
More information about the core-libs-dev
mailing list