> On 2010-08-09 12:13:59, Nathan Binkert wrote:
> > util/m5/m5.c, line 68
> > <http://reviews.m5sim.org/r/121/diff/1/?file=1333#file1333line68>
> >
> >     I actually just noticed that you're zeroing sizeof(buf).  Perhaps you 
> > should do what gabe said and just touch one word per page.  Seems like this 
> > could also be #ifdef x86.

Seems like an overoptimization to me, unless we plan on using readfile to bring 
in some really huge files.  Also, there's no harm in doing this in non-x86 
ISAs.  I won't fight putting those changes in, I'm just questioning their 
necessity.


- Steve


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviews.m5sim.org/r/121/#review154
-----------------------------------------------------------


On 2010-08-09 10:35:49, Joel Hestness wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.m5sim.org/r/121/
> -----------------------------------------------------------
> 
> (Updated 2010-08-09 10:35:49)
> 
> 
> Review request for Default.
> 
> 
> Summary
> -------
> 
> util/m5/m5.c: in readfile(), added memset to touch all pages - ensure they 
> are in the page table
> 
> This problem is caused by Linux demand paging.  If the pages are not yet 
> mapped in the page table, the M5 utility does not know the physical memory 
> address in the simulated system to which it is sending the file read from the 
> host machine.
> 
> 
> Diffs
> -----
> 
>   util/m5/m5.c a75564db03c3 
> 
> Diff: http://reviews.m5sim.org/r/121/diff
> 
> 
> Testing
> -------
> 
> This fixes the functionality for x86, where the problem was first 
> encountered.  I have also tested the utility for Alpha.  The simulated system 
> executes approximately 10% more instructions during the readfile operation 
> due to the memset, but the simulation time required for this is still 
> marginal.  Using memset provides an ISA independent solution compared to 
> buffer accesses that use a page-sized stride.
> 
> 
> Thanks,
> 
> Joel
> 
>

_______________________________________________
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to