Very interesting!! Both the link and the movntq instruction. I'll read and study.<div><br></div><div>Thanks Tobias!!<div><br><div class="gmail_quote">2012/12/8 Tobias Boege <span dir="ltr"><<a href="mailto:tobias@gambas-buch.de" target="_blank">tobias@gambas-buch.de</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Sat, 08 Dec 2012, Gustavo da Silva wrote:<br>
> Hello Kernel Brothers!! How are you???<br>
><br>
> So, I would like test the performance of my notebook, developing one or two<br>
> utilities, and have a better<br>
> mensurement about the speed.<br>
><br>
> But it can help all of us.<br>
><br>
> 1st: I would like mensure the speed making a counter (exacly bogomips? may<br>
> be). Loop+counter during 1 tickrate.<br>
> 2nd: The most interesting: How many memory cells in ram can we<br>
> access during 1tickrate? How could we develop this?!<br>
><br>
> Both utils may run in long mode (64bits). Well, in real mode too; so, we<br>
> can compare the speed in the two modes!<br>
><br>
> Some one knows how to develop a very small program/routine about that?!<br>
><br>
> For the 2nd situation, a simple idea wrote in codesnipet form (consider the<br>
> intention, not the sintax! there are bugs! I know. Intel syntax.)<br>
<br>
</div>Obviously! ;-)<br>
<div class="im"><br>
><br>
> dw the_counter_cell 0<br>
> lea bx, the_counter_cell<br>
> xor bx,bx<br>
> label:<br>
> inc [bx] # Could not be so simple like this, because the address can<br>
> be cached. Right?<br>
> loop label # breaked by an interruption. Just to express the intention.<br>
><br>
> How could we create a small code for the 2nd situation, tring to force the<br>
> processor to not use the cache?<br>
<br>
</div>As Drepper says[0], use the movntq instruction on x86_64 to bypass the<br>
cache.<br>
<br>
Regards,<br>
Tobi<br>
<br>
[0] <a href="http://www.akkadia.org/drepper/cpumemory.pdf" target="_blank">http://www.akkadia.org/drepper/cpumemory.pdf</a> p. 47ff.<br>
<br>
<br>
_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Atenciosamente, <br><br>Gustavo da Silva<br><a href="mailto:gustavodasilva@gmail.com">gustavodasilva@gmail.com</a><br>
</div></div>