<div dir="ltr"><div><div><div><div><div>Well my ideas are a bit fragmented right now and I am not sure that I can even call this a proposal (more vague ideas) but I can try to get some more cohesive thoughts together by Tuesday. I have to confess that I am a bit more comfortable with developing ideas via email since that is the traditional mode of operation among kernel developers.<br>
<br></div>I think we need to explore way to simplify the use of RDMA and at the same time make it more universally applicable. Using established mechanisms like the library system and existing raw device interfaces could be a viable approach.<br>
<br></div>I just looked at the inline code in ibverbs and it looks like this is simply a move of the indirect function call into the app instead of being in separate function. That is not really what I would call inline. A true inline call would be able to hand the device i/o without any additional function calls. With libraries true inline calls would be possible if one would compile against a specific vendor library. A vendor could provide an inline function f.e. to poll the cq by reading/writing memory mapped location directly from within the app.<br>
<br></div>If one has done so then the application would be only able to work with a certain device since device specific inline code was generated in the executable.<br><br></div>If we just want the indirection inline then that can also be done with a library approach by setting up vectors there. dlopen and friends can then be used to populate that table and the same approach that ibverbs does today would still work.<br>
<br></div>How much of a benefit is the current inline indirection implementation in ibverbs.h for ib_post_send etc? <br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Dec 5, 2013 at 1:15 PM, Paul Grun <span dir="ltr"><<a href="mailto:grun@cray.com" target="_blank">grun@cray.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div link="blue" vlink="purple" lang="EN-US">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I am replying to Christoph’s initial message because it seems to frame the question most clearly.<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Christoph, could I persuade you to present your thoughts in the form of a brief proposal?  That might be a good way to frame the question in order to bring
 the whole up to speed on your idea as well as accelerate the process of coming to closure.  It need not be a detailed proposal, but simply a way to both fully understand the idea and understand its merits.<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Correct me if I am wrong, but I think you are proposing two separate, but interrelated ideas: 
<u></u><u></u></span></p>
<p><u></u><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><span>1.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><u></u><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Leverage existing Linux shared library mechanisms as a “pseudo-framework” for providing application access to provider services
<u></u><u></u></span></p>
<p><u></u><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><span>2.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><u></u><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">The use of the VFIO interface to all direct memory access transfers (including direct access to low level driver controls).<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Is this something you would be willing to take on for next Tuesday’s meeting?<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Thanks,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">-Paul<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:openframeworkwg-bounces@lists.openfabrics.org" target="_blank">openframeworkwg-bounces@lists.openfabrics.org</a> [mailto:<a href="mailto:openframeworkwg-bounces@lists.openfabrics.org" target="_blank">openframeworkwg-bounces@lists.openfabrics.org</a>]
<b>On Behalf Of </b>Christoph Lameter<br>
<b>Sent:</b> Wednesday, December 04, 2013 8:59 AM<br>
<b>To:</b> '<a href="mailto:openframeworkwg@lists.openfabrics.org" target="_blank">openframeworkwg@lists.openfabrics.org</a>' (<a href="mailto:openframeworkwg@lists.openfabrics.org" target="_blank">openframeworkwg@lists.openfabrics.org</a>)<br>

<b>Subject:</b> [Openframeworkwg] Some concerns about the new Fabric/IBverbs API<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">One of the things that worries me is that we develop specialized APIs based on function vectors.<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">That kind functionality is already provided by the shared library systems in Linux. Could not be each of the modules that we talked about just be mapped to a shared library and define the API simply that way?
 There are mechanisms in place to deal with compatibility issues. <br>
<br>
What are the specific requirements that prevent us from using the standard library approach? If at all possible we should simply use what is there.<u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Then regarding the separation between user space and kernel space: There are alternate approaches possible to the use of IBverbs. The Linux kernel has added a VFIO interface that allows exposure of device driver
 controls to user space. If we could base libfabrics on that API instead then the RDMA approach would be generically be usable with any device that supports VFIO.<br>
<br>
<a href="http://lwn.net/Articles/509153/" target="_blank">http://lwn.net/Articles/509153/</a><u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">We could slim down the components needed in the kernel and provide some simpler management APIs. The IBverbs code per se could be in userspace.<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">In fact in our company we have some tentative ideas that we could avoid going through IBverbs by going through VFIO. The problem there is that no standard user space APIs exist to interact with a device. Having
 such an API would allow a generic way to use RDMA with devices. We have a couple o vendors that are already providing some simplistic proprietary libraries here. Standardization would be good.<br>
<br>
<u></u><u></u></p>
</div>
</div></div></div>
</div>

</blockquote></div><br></div>