<div dir="ltr"><div><div><div>The stripping out of branches etc would have to be tested. The compiler needs to be able to figure out that the branches are not used. Otherwise having more specialized function is useful regardless.<br>
<br></div>The indirection is still an issue because it increases the cache footprint. The call tables tend to grow over time as functionality is added and so there may be a continual slowdown. We have seen that in the kernel. If we want to do the indirection tables then at least lets place all performance sensitive calls in the same cache line.<br>
<br></div>Indirection are often a problem for prefetch and also an issue for the compiler if global optimizations are desired.<br><br></div><div>The best result in terms of performance are obtained if the cache use for code and data are minimal and if references are restricted to a minimum set of Operating system pages as well as tlb entries. Having indirection tables tends to lead to code and data being distributed here and there and thus impacts latency and performance.<br>
</div><div><div><div><div><br></div></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Dec 10, 2013 at 1:53 PM, Hefty, Sean <span dir="ltr"><<a href="mailto:sean.hefty@intel.com" target="_blank">sean.hefty@intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">> > > To do this a vendor just has to provide their own inlines for the hot<br>
> > > path function call tables, it isn't technically very challenging..<br>
> ><br>
> > Right. It would also allow the compiler to further optimize the code.<br>
><br>
> Yes, and linking to the provider directly and use a relocation instead<br>
> of a table lookup with provide some additional tiny savings.<br>
<br>
</div>Thinking about this more after the meeting, if we have a more generic call, such as ibv_post_send(), then there could be significant benefits to inlining the provider code.  The compiler should be able to strip out several branches and eliminate data structures.<br>

<br>
However, if we support optimized calls, such as rc_qp->post_rdma_write_with_immediate(), it would seem that the benefits of inlining would be minimal.  Ideally, there shouldn't be much that the compiler could do.<br>

<span class="HOEnZb"><font color="#888888"><br>
- Sean<br>
</font></span></blockquote></div><br></div>