RFR(s): Improving performance of Windows socket connect on the loopback adapter
Alex Menkov
alexey.menkov at oracle.com
Wed Jul 22 22:05:36 UTC 2020
Hi Nikola,
One note.
src\java.base\windows\native\libnet\net_util_md.h
IN6_IS_ADDR_V4MAPPED_LOOPBACK considers only 127.0.0.1 as loopback
address, but AFAIR it's the whole block 127.0.0.0/8 and 127.0.0.1 is
just the most common used address.
--alex
On 07/22/2020 07:14, Nikola Grcevski wrote:
> Thanks again Alan. My apologies for the delayed response, I was away most of yesterday.
>
> I've updated the webrev with the change as requested:
>
> http://cr.openjdk.java.net/~adityam/nikola/fast_connect_loopback_3/
>
> None of us here at Microsoft have contributor status yet, so I'll need a sponsor to get this change merged.
>
> Best,
> Nikola
>
> -----Original Message-----
> From: Alan Bateman <Alan.Bateman at oracle.com>
> Sent: July 21, 2020 11:19 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 21/07/2020 02:34, Nikola Grcevski wrote:
>> Hi Alan and Bernd,
>>
>> Thanks again for the code review of my changes and the suggestions!
>>
>> Please find the updated webrev here:
>>
>> https://nam06.safelinks.protection.outlook.com/?url=http:%2F%2Fcr.open
>> jdk.java.net%2F~adityam%2Fnikola%2Ffast_connect_loopback_2%2F&data
>> =02%7C01%7CNikola.Grcevski%40microsoft.com%7C4d89c178d8a147bc6e1708d82
>> d895c25%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C63730941526294228
>> 9&sdata=75i%2BHx1QXiqydrPd49Z4UbiO83SSLCxgXBrzovGDs%2FY%3D&res
>> erved=0
>>
>> 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.
>>
> I think this version looks okay, except that I'd prefer if the if the expression at L244-246 were on one line, not split over there. Do you have a sponsor to push this?
>
> -Alan
>
More information about the net-dev
mailing list