Backporting the TCP loopback fast path (Windows) improvement to OpenJDK v7
Seán Coffey
sean.coffey at oracle.com
Fri Jan 23 13:55:03 UTC 2015
Valeriy,
I didn't see a follow up on this. I've modified the patch so that we
cater for a possible WSAEINVAL error to be returned from the
NET_EnableFastTcpLoopback call. Latest webrev :
http://cr.openjdk.java.net/~coffeys/webrev.8060170.7u.v2/webrev/
changes only in
http://cr.openjdk.java.net/~coffeys/webrev.8060170.7u.v2/webrev/src/windows/native/sun/nio/ch/Net.c.cdiff.html
Good to push ? I'll try and get this into 7u80 but can't guarantee that
now given that we've entered the rampdown/stabilization phase.
regards,
Sean.
On 15/01/15 12:09, Seán Coffey wrote:
> Valeriy,
>
> I used the jdk7u patch that was attached to the mail request. It
> applied cleanly. I've posted webrev here for reference (patch there
> also):
> http://cr.openjdk.java.net/~coffeys/webrev.8060170.7u/webrev/
>
> The new WSAIoctl call would appear to be failing with WSAEINVAL. The
> NET_EnableFastTcpLoopback call already tests for WSAEOPNOTSUPP - maybe
> we should test for WSAEINVAL also and perhaps return silently if
> windows don't support the option. Or maybe - we state this as desired
> behaviour - i.e this option is suitable for modern windows kernels -
> your note below would contradict what I'm seeing though.
>
> The test passes for me on Windows 7 and fails on Windows XP.
>
> regards,
> Sean.
>
> On 15/01/2015 11:15, Valery Kopylov (Akvelon) wrote:
>> Hi Sean,
>>
>> Our TCP loopback implementation should process the option correctly
>> on older windows kernels. I tried to reproduce the issue, but it
>> works fine on my side. So I have an assumption that part of the code
>> present on jdk9 patch has been lost and this causes such errors.
>> Did you use the patch for jdk7 sent by Martin or perform the
>> backporting from jdk8 or 9 by yourself?
>> Could you please send me output of "hg diff" command in jdk folder?
>>
>>
>> Best regards,
>> Valeriy Kopylov
>>
>> -----Original Message-----
>> From: Seán Coffey [mailto:sean.coffey at oracle.com]
>> Sent: Tuesday, January 13, 2015 22:31
>> To: Martin Sawicki (MS OPEN TECH); jdk7u-dev at openjdk.java.net
>> Cc: Valery Kopylov (Akvelon); Kirk Shoop (MS OPEN TECH); Alan Bateman
>> Subject: Re: Backporting the TCP loopback fast path (Windows)
>> improvement to OpenJDK v7
>>
>> Hi Martin,
>>
>> I've run into a problem in backporting this to JDK 7u. The test fails
>> on our build/test systems. (windows XP) -
>>> reason: User specified action: run main/othervm
>>> -Djdk.net.useFastTcpLoopback StressLoopback elapsed time (seconds):
>>> 0.64
>>> STDOUT:
>>> STDERR:
>>> java.net.SocketException: Invalid argument: fastLoopback
>>> at sun.nio.ch.Net.socket0(Native Method)
>>> at sun.nio.ch.Net.serverSocket(Net.java:445)
>>> at
>>> sun.nio.ch.AsynchronousServerSocketChannelImpl.<init>(AsynchronousServerSocketChannelImpl.java:71)
>>> at
>>> sun.nio.ch.WindowsAsynchronousServerSocketChannelImpl.<init>(WindowsAsynchronousServerSocketChannelImpl.java:69)
>>> at
>>> sun.nio.ch.WindowsAsynchronousChannelProvider.openAsynchronousServerSocketChannel(WindowsAsynchronousChannelProvider.java:83)
>>> at
>>> java.nio.channels.AsynchronousServerSocketChannel.open(AsynchronousServerSocketChannel.java:140)
>>> at
>>> java.nio.channels.AsynchronousServerSocketChannel.open(AsynchronousServerSocketChannel.java:161)
>>> at StressLoopback.main(StressLoopback.java:42)
>> This seems to be from the fact that the new SIO_LOOPBACK_FAST_PATH
>> IOCTL code is only supported on more modern windows systems. I'm
>> wondering if we should change the src code to not attempt to use this
>> option on older windows kernels or if I should just modify the
>> testcase to not run the test on older windows systems ?
>>
>> regards,
>> Sean.
>>
>>
>>
>> On 09/01/2015 16:25, Martin Sawicki (MS OPEN TECH) wrote:
>>> Sean, thank you for the update and your assistance. Looking forward.
>>>
>>> -----Original Message-----
>>> From: Seán Coffey [mailto:sean.coffey at oracle.com]
>>> Sent: Friday, January 09, 2015 8:24 AM
>>> To: Martin Sawicki (MS OPEN TECH); jdk7u-dev at openjdk.java.net
>>> Cc: Valery Kopylov (Akvelon); Kirk Shoop (MS OPEN TECH)
>>> Subject: Re: Backporting the TCP loopback fast path (Windows)
>>> improvement to OpenJDK v7
>>>
>>> Hey Martin,
>>>
>>> I can help in getting this enhancement ported to jdk7u-dev. I'm just
>>> waiting on approval for use of new system property in jdk7u release.
>>> Once I have that, I can get this in.
>>>
>>> regards,
>>> Sean.
>>>
>>> On 08/01/15 20:01, Martin Sawicki (MS OPEN TECH) wrote:
>>>> Hello again,
>>>> We'd like to propose to back-port our TCP loopback fast path
>>>> performance improvement for Windows that was recently accepted into
>>>> OpenJDK v9 and v8 into v7.
>>>> Just for reference, the original OpenJDK v9 fix just for reference
>>>> can be found here:
>>>> http://hg.openjdk.java.net/jdk9/dev/jdk/rev/26e6402772c8.
>>>>
>>>> Our suggested webrev patch file for OpenJDK *v7* is attached to
>>>> this message, based on our understanding of the back-porting steps.
>>>>
>>>> Your review and acceptance of this contribution would be appreciated.
>>>>
>>>> Best regards,
>>>> Martin Sawicki (and Kirk Shoop, and Valeriy Kopylov) Microsoft Open
>>>> Technologies, Inc.
>>>> A subsidiary of Microsoft Corp.
>>>>
>
More information about the jdk7u-dev
mailing list