RFR(s): Improving performance of Windows socket connect on the loopback adapter
Nikola Grcevski
Nikola.Grcevski at microsoft.com
Fri Jul 17 01:10:47 UTC 2020
Thanks for reviewing the patch Alan.
I applied your suggestions in this new webrev here:
http://cr.openjdk.java.net/~adityam/nikola/fast_connect_loopback_1/
I renamed the macro to IN6_IS_ADDR_MAPPED_IP4_LOOPBACK, following how IN6_IS_ADDR_ANY
is named in the same file. I hope the new name works, but if there's something more suitable I
don't mind changing it again.
I re-tested the patch on the jtreg tier1, net, nio and rmi suites. If there are any other tests I
should run, or if you have a suggestion for new tests I should write please let me know.
Best,
Nikola
-----Original Message-----
From: Alan Bateman <Alan.Bateman at oracle.com>
Sent: July 16, 2020 4:47 AM
To: Nikola Grcevski <Nikola.Grcevski at microsoft.com>; net-dev at openjdk.java.net
Subject: Re: RFR(s): Improving performance of Windows socket connect on the loopback adapter
On 16/07/2020 01:02, Nikola Grcevski wrote:
> :
>
> Please find the webrev with this improvement here:
>
> https://nam06.safelinks.protection.outlook.com/?url=http:%2F%2Fcr.open
> jdk.java.net%2F~adityam%2Fnikola%2Ffast_connect_loopback%2F&data=0
> 2%7C01%7CNikola.Grcevski%40microsoft.com%7C3a6d8732ac1643b5b88c08d8296
> 526de%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637304861703337536&
> amp;sdata=ZOAsgwuLxmwD3lUOl1kdRJMuhyX4qkp1UdvAlcB08io%3D&reserved=
> 0
>
Just a few comments on the first iteration.
Can we move the function prototype to the Windows net_util_md.h? That would avoid needing to update the shared net_util.h and would avoid unused code in the Unix implementation.
Net.connect0 is used for both TCP and UDP sockets. It already uses getsockopt to query the socket type so I think we can do that unconditionally. That would allow you to use the ioctl when the type == SOCK_STREAM and the target is the loopback.
I think we need to find a better name for IN6_IS_ADDR_LOOPBACK_IP4, maybe we could find something that has "MAPPED" in the name so that it's a bit more consistent with other macros.
-Alan.
More information about the net-dev
mailing list