<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">&gt;1. use early_param to get the physical start address and size of test_region, or you can just ignore this step and hard code to 510M and 2M for test purpose only.</span><br style="font-family:arial,sans-serif;font-size:13px">

<br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">&gt;2. use ioremap_nocache() to map this region to a virtual region. note that this funtion may fail if you are asking a very large vitual memroy region.</span><br>

<div><br></div><div style><font face="arial, sans-serif">Sounds good, i am gonna try this and let you know.. :)</font></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Feb 27, 2013 at 8:19 PM, buyitian <span dir="ltr">&lt;<a href="mailto:buyit@live.cn" target="_blank">buyit@live.cn</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">----------------------------------------<br>
&gt; From: <a href="mailto:buyit@live.cn">buyit@live.cn</a><br>
&gt; To: <a href="mailto:coolsandyforyou@gmail.com">coolsandyforyou@gmail.com</a>; <a href="mailto:kernelnewbies@kernelnewbies.org">kernelnewbies@kernelnewbies.org</a><br>
&gt; Subject: RE: How to measure the RAM read/write performance<br>
&gt; Date: Wed, 27 Feb 2013 22:33:15 +0800<br>
&gt; CC: <a href="mailto:dhylands@gmail.com">dhylands@gmail.com</a><br>
<div class="im">&gt;<br>
&gt; ________________________________<br>
&gt; &gt; From: <a href="mailto:coolsandyforyou@gmail.com">coolsandyforyou@gmail.com</a><br>
&gt; &gt; Date: Tue, 26 Feb 2013 17:01:54 +0530<br>
&gt; &gt; Subject: How to measure the RAM read/write performance<br>
&gt; &gt; To: <a href="mailto:kernelnewbies@kernelnewbies.org">kernelnewbies@kernelnewbies.org</a><br>
&gt; &gt; CC: <a href="mailto:dhylands@gmail.com">dhylands@gmail.com</a><br>
&gt; &gt;<br>
&gt; &gt; Hi All<br>
&gt; &gt; In performance benchmark tools, When we profile read/write timings<br>
&gt; &gt; mostly, those read/writes are done to cache only.<br>
&gt; &gt;<br>
&gt; &gt; I want to measure my DDR(RAM chip) performance.<br>
&gt; &gt; So i want to make sure, every read/write should happen to DDR RAM chip only.<br>
&gt; &gt;<br>
&gt; &gt; How can i achieve this...Any ideas/suggestions...?<br>
&gt;<br>
&gt; try to reserve a large region from bootloader(L4 in Qualcomm platform), let&#39;s say it is 10MB continuous physical memory.<br>
<br>
</div>sorry, to be accurate, reserve physical memory is done by kernel cmdline, this cmdline parameter can be passed from L4 to kernel, or configed by kernel itself.<br>
the cmdline will be like below:<br>
mem=510M@0 test_region=2M@510M<br>
<br>
above example tells kernel you have totally 512MB physical memory, but kernel will only use the first 510MB, the latter 2MB memory is used by you. how to map and use this region depends on you.<br>
<div class="im"><br>
&gt; in kernel, map this region to an continuous virtual region, note that the pgprot should be uncachable since you want to test without cache.<br>
<br>
</div>1. use early_param to get the physical start address and size of test_region, or you can just ignore this step and hard code to 510M and 2M for test purpose only.<br>
<br>
2. use ioremap_nocache() to map this region to a virtual region. note that this funtion may fail if you are asking a very large vitual memroy region.<br>
<div class="HOEnZb"><div class="h5"><br>
&gt; once you configed like this, you can read/write to this vitual region without data cache invovled.<br>
&gt;<br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt; With regards,<br>
&gt; &gt; Sandeep Kumar Anantapalli,<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________ Kernelnewbies mailing<br>
&gt; &gt; list <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
&gt; &gt; <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
&gt; _______________________________________________<br>
&gt; Kernelnewbies mailing list<br>
&gt; <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
&gt; <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div></div></blockquote>

</div><br><br clear="all"><div><br></div>-- <br>With regards,<br>Sandeep Kumar Anantapalli,<br>
</div>