<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">>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">>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"><<a href="mailto:buyit@live.cn" target="_blank">buyit@live.cn</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">----------------------------------------<br>
> From: <a href="mailto:buyit@live.cn">buyit@live.cn</a><br>
> To: <a href="mailto:coolsandyforyou@gmail.com">coolsandyforyou@gmail.com</a>; <a href="mailto:kernelnewbies@kernelnewbies.org">kernelnewbies@kernelnewbies.org</a><br>
> Subject: RE: How to measure the RAM read/write performance<br>
> Date: Wed, 27 Feb 2013 22:33:15 +0800<br>
> CC: <a href="mailto:dhylands@gmail.com">dhylands@gmail.com</a><br>
<div class="im">><br>
> ________________________________<br>
> > From: <a href="mailto:coolsandyforyou@gmail.com">coolsandyforyou@gmail.com</a><br>
> > Date: Tue, 26 Feb 2013 17:01:54 +0530<br>
> > Subject: How to measure the RAM read/write performance<br>
> > To: <a href="mailto:kernelnewbies@kernelnewbies.org">kernelnewbies@kernelnewbies.org</a><br>
> > CC: <a href="mailto:dhylands@gmail.com">dhylands@gmail.com</a><br>
> ><br>
> > Hi All<br>
> > In performance benchmark tools, When we profile read/write timings<br>
> > mostly, those read/writes are done to cache only.<br>
> ><br>
> > I want to measure my DDR(RAM chip) performance.<br>
> > So i want to make sure, every read/write should happen to DDR RAM chip only.<br>
> ><br>
> > How can i achieve this...Any ideas/suggestions...?<br>
><br>
> try to reserve a large region from bootloader(L4 in Qualcomm platform), let'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>
> 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>
> once you configed like this, you can read/write to this vitual region without data cache invovled.<br>
><br>
> ><br>
> > --<br>
> > With regards,<br>
> > Sandeep Kumar Anantapalli,<br>
> ><br>
> > _______________________________________________ Kernelnewbies mailing<br>
> > list <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>
> _______________________________________________<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> </div></div></blockquote>
</div><br><br clear="all"><div><br></div>-- <br>With regards,<br>Sandeep Kumar Anantapalli,<br>
</div>