adding rsockets support into JDK
Lu, Yingqi
yingqi.lu at intel.com
Wed Aug 29 16:35:26 UTC 2018
Hi Alan,
Thank you very much for your feedback.
rdma/rsocket.h will be installed as part of librdmacm package. I found some examples of using dlopen/dlsym in current jdk code tree and I will try to study and follow. This is my first time doing this, I will let you know if I have questions (I am sure I will have :-)).
I will also try to avoid the two protected functions from SocketImpl and modify other items you mentioned in the email.
Thanks,
Lucy
>-----Original Message-----
>From: Alan Bateman [mailto:Alan.Bateman at oracle.com]
>Sent: Wednesday, August 29, 2018 5:28 AM
>To: Lu, Yingqi <yingqi.lu at intel.com>
>Cc: nio-dev at openjdk.java.net; Viswanathan, Sandhya
><sandhya.viswanathan at intel.com>; Aundhe, Shirish
><shirish.aundhe at intel.com>; Kaczmarek, Eric <eric.kaczmarek at intel.com>
>Subject: Re: adding rsockets support into JDK
>
>On 20/08/2018 05:50, Lu, Yingqi wrote:
>> Hi Alan,
>>
>> Here is the version 09 of the patch:
>> http://cr.openjdk.java.net/~ylu/8195160.09/
>>
>> In this version, I have following changes made:
>>
>> 1. The setSocket and setServerSocket in SocketImpl are set to "protected"
>so that they can be overridden in RdmaSocketImpl from jdk.net. In this
>version, I still keep them the same way. If you have suggestions on a different
>approach, please let me know.
>>
>> 2. Remove the unnecessary check for RDMA impl on supportedOptions
>from Socket and ServerSocket.
>>
>> 3. In RdmaSocketOptions.java, I added the texts saying the three options
>can only be set before connect or bind.
>>
>> At the same time, I was thinking on an issue you mentioned before. If
>librdmacm is not pre-installed on the machine, how do we handle it? Do we
>need to have a version of librdmacm.so included, or the build process tries to
>download/install it, or it simply provides a warning? What do you suggest?
>>
>In addition to librdmacm then I assume the JNI code won't compile when the
>package with rmda/rsocket.h is not installed. Not the Linux distro model but
>the JDK has a history of building binaries that can be used on several
>distributions. This has meant using dlopen/dlsym to link optional library
>dynamically and locate the symbols for the functions that are needed. You
>may have to resort to this approach here as I think you are looking for the JDK
>builds to be capable of using RDMA sockets when the builds are used on a
>system that has the packages installed.
>
>On the API changes then I see that two protected setXXXX methods have
>been added to SocketImpl. I think we should try to avoid that, even if it means
>using the shared secrets mechanism.
>
>I've skimmed through the implementation changes in the latest webrev and it
>looks reasonable. The implementation is currently in the rdma.ch tree and I
>assume you'll move that to a jdk.internal package at some point.
>Also it might be simpler to a simple "throws UOE" implementation in the
>shared directory - by this I mean the RmdaPollSelectorProvider and
>RdmaSocketImpl can be in the linux tree so that we aren't compiling all that
>code on other platforms. In passing, I don't think RdmaNet should extend
>sun.nio.ch.Net. The Net class is a utility class with static methods and should
>really be final.
>
>That's all I have for now.
>
>-Alan
More information about the nio-dev
mailing list