RFR(s): Improving performance of Windows socket connect on the loopback adapter
Nikola Grcevski
Nikola.Grcevski at microsoft.com
Tue Jul 21 01:34:41 UTC 2020
Hi Alan and Bernd,
Thanks again for the code review of my changes and the suggestions!
Please find the updated webrev here:
http://cr.openjdk.java.net/~adityam/nikola/fast_connect_loopback_2/
I decided to explicitly check so_rv for success consistently in the two places. It feels safer
against future changes to the internal implementation of getsockopt.
I left the JNICALL and jint to match the other similar functions in the net
helper functions file as before. It sounds like future clean-up will simplify this, but if I
misunderstood from your comments please let me know and I'll update accordingly.
Best,
Nikola
-----Original Message-----
From: Alan Bateman <Alan.Bateman at oracle.com>
Sent: July 19, 2020 2:52 AM
To: Bernd Eckenfels <ecki at zusammenkunft.net>; 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 18/07/2020 18:43, Bernd Eckenfels wrote:
> Hello,
>
> I am unsure about the signatures, s is of type SOCKET, why not keep
> this - I think I missed why this would be a JNICALL convention.
>
> There are two inconsistencies:
>
> The header file and implementation uses (int) argument, the call casts
> to (jint).
>
The networking support functions are in net.dll. The use-site for the current patch is nio.dll.
Yes, are a few inconsistent int/jint issues with the NET_* functions that libnet/net exports. Not a big concern unless you spot any cases where the function prototype doesn't match the function. For now, the single usage of NET_EnableFastTcpLoopbackConnect does not check the status. Once the legacy PSI and PSDI implementations go away then there will be a lot of opportunity to clean up some of this code. It might be that the some of the supporting functions go away completely, maybe some will move into libnio.
-Alan.
More information about the net-dev
mailing list