RFR: 8266369: (se) Add wepoll based Selector [v6]
Alan Bateman
alanb at openjdk.java.net
Thu May 6 16:06:59 UTC 2021
On Thu, 6 May 2021 15:51:36 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> Alan Bateman has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 11 additional commits since the last revision:
>>
>> - Merge
>> - Bring back getDescriptor, bzero poll array when initially created
>> - epoll_create1 returns NULL on error
>> - Remove unused WEPoll.getDescriptor. Update micro to close listener
>> - Fix copyright header on SelectOne benchmark
>> - Merge
>> - Propagate exception from discardOOB, cleanup
>> - Merge
>> - Use 'to' instead of '(int) timeout
>> - Move SelectorWakeup micro to channels directory
>> - ... and 1 more: https://git.openjdk.java.net/jdk/compare/b40c5cb7...260b13fe
>
> test/micro/org/openjdk/bench/java/nio/channels/SelectOne.java line 71:
>
>> 69:
>> 70: try (ServerSocketChannel listener = ServerSocketChannel.open()) {
>> 71: listener.bind(new InetSocketAddress(0));
>
> Is using the wildcard really necessary here? I am concerned that the test is relying on unspecified behaviour - namely:
> - listener is bound to the wildcard
> - listener.getLocalAddress() is *probably* the wildcard
> - later SocketChannel is connected using that address which is still *probably* the wildcard.
> For the sake of stability - should the test preferably use InetAddress.getLoopbackAddress() for binding and connecting?
This is micro rather than a jtreg test so only suitable for running in very controlled environments. I can of course change it to use the loopback address. The original benchmark did that, but I had to strip it down for openjdk/jdk.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3816
More information about the nio-dev
mailing list