<div dir="ltr"><span style="font-size:12.8px">> Note that due to things like cache line misses, looking at the code will</span><br style="font-size:12.8px"><span style="font-size:12.8px">> tell you almost nothing about which is *really* the "best" code...</span><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">I thought of counting number of instructions in disassembled code for each case. Since I'm only replacing certain API's , rest of the code remains same. </span><br></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">For example </span><span style="color:rgb(0,0,0);font-family:'Times New Roman';text-align:center"> </span></div><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';text-align:center">Replacing ACCESS_ONCE() API with READ_ONCE()</span></div><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';text-align:center"><br></span></div><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';text-align:center">Please correct me , if I'm wrong.</span></div><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';text-align:center"><br></span></div><div><span style="font-size:12.8px">> Why do you need to cross-compile? Just build the drivers as x86_64. Pretty</span><br style="font-size:12.8px"><span style="font-size:12.8px">> much anybody who actually *cares* about performance has moved off 32-bit</span><br style="font-size:12.8px"><span style="font-size:12.8px">> kernels a while ago (unless you're stuck with an embedded 32-bit CPU).</span><br></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Earlier, whenever I run this command</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"> $ make drivers/staging/rdma/</span></div><div><span style="font-size:12.8px">I was getting this error</span></div><div><span style="font-size:12.8px"><br></span></div><div><h1 itemprop="name" style="margin:0px 0px 0.5em;padding:0px;border:0px;font-size:22px;line-height:1.3;color:rgb(36,39,41);font-family:Arial,'Helvetica Neue',Helvetica,sans-serif"><span style="font-weight:normal">CONFIG_X86_X32 enabled but no binutils support</span></h1></div><div>So, I thought to cross compile for x82. But now it seems i have solved by following<a href="http://stackoverflow.com/questions/12501124/errors-in-compiling-linux-kernel-module-config-x86-x32-enabled-but-no-binutils"> this </a></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 7, 2016 at 3:16 AM, <span dir="ltr"><<a href="mailto:Valdis.Kletnieks@vt.edu" target="_blank">Valdis.Kletnieks@vt.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, 07 Jun 2016 02:27:03 +0530, Shyam Saini said:<br>
<br>
> To choose best optimized code, i need to first compile them and then<br>
> disassemble the compiled code, where a change in single line would make a<br>
> significant difference in the performance.<br>
<br>
</span>Note that due to things like cache line misses, looking at the code will<br>
tell you almost nothing about which is *really* the "best" code...<br>
<br>
> So, my question is how to compile* x86 based network drivers on x86_64<br>
> Ubuntu machine*. Currently I'm running Ubuntu 14.04.<br>
<br>
Why do you need to cross-compile? Just build the drivers as x86_64. Pretty<br>
much anybody who actually *cares* about performance has moved off 32-bit<br>
kernels a while ago (unless you're stuck with an embedded 32-bit CPU).<br>
</blockquote></div><br></div>