Re: [gem5-users] Doubling system clock freq doesn't halve simulated time?

2018-08-23 Thread Timon Evenblij
Hi,

I could be mistaken but I would say there are still some (perhaps default)
latency parameters in your configuration that use a time-based value
instead of a cycle-based value, or use a cycle-based value that is based on
a different clock. The main memory comes to mind first, as this often has a
default off-chip latency of 10 ns, and has its own internal clock. If you
want to investigate, I suggest to look there first.


Regards

Timon


On Wed, Aug 22, 2018 at 9:01 PM Heng Yu  wrote:

> Hi,
>
> I am playing in the SE mode, with script
> 'GEM5_PATH/configs/learning_gem5/part2/simple_memobj.py', where I altered
> frequencies between:
>
> # Set the clock fequency of the system (and all of its children)
> system.clk_domain = SrcClockDomain()
> system.clk_domain.clock = '1GHz'
>
> and
>
> # Set the clock fequency of the system (and all of its children)
> system.clk_domain = SrcClockDomain()
> system.clk_domain.clock = '2GHz'
>
> I read the first line from "stats.txt" about the sim_seconds, 1GHz takes
> 0.000508s, while 2GHz takes 0.000459s, which is not halved as overall
> system frequency is doubled. Any hints about the reason? Any other configs
> needed to make it as desired?
>
> The command is: build/X86/gem5.opt
> configs/learning_gem5/part2/simple_memobj.py
>
> The benchmark is: 'tests/test-progs/hello/bin/x86/linux/hello'
>
> Thanks a lot.
>
> ___
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Re: [gem5-users] Checkpoint Creation in SE mode

2018-08-23 Thread Timon Evenblij
Hi Sakshi,

I did not check completely, but at first sight you are misinterpreting the
--restore-with-cpu option.
https://stackoverflow.com/questions/49011096/how-to-switch-cpu-models-in-gem5-after-restoring-a-checkpoint-and-then-observe-t
has information on what it does: use --restore-with-cpu only if you made a
checkpoint with a non-atomic cpu model. Otherwise, don't use this option
and just say cpu-type=detailed or whatever model you want to use after
resuming the checkpoint.

The reasoning is that gem5 needs to know the exact model which the
checkpoint was made with (normally this is the atomic model). It will
resume the checkpoint using the --restore-with-cpu option (atomic by
default) to set all the state correctly. After setting up the state, it
will switch to the model specified with the regular --cpu-type option, to
do the intended simulation. I have to admit it is a bit confusing, but
hopefully you understand it now.

Regards

Timon

On Wed, Aug 22, 2018 at 3:23 PM Abhishek Singh <
abhishek.singh199...@gmail.com> wrote:

> You can also use simpoints else just fast forward the start up instruction
> and run for some instruction using -I
>
> On Wed, Aug 22, 2018 at 8:54 AM Sakshi Tiwari 
> wrote:
>
>> Can someone please reply to the query above? It will be really helpful.
>>
>> Regards,
>> Sakshi
>>
>>
>> On Fri, Aug 10, 2018 at 12:53 AM Sakshi Tiwari 
>> wrote:
>>
>>> Hi,
>>>
>>> I am running gem5 in se mode and I am using SPEC2006 test suite for my
>>> experiments. To run the representative section of each of the SPEC
>>> benchmark I created simpoints. I have a few questions now:
>>>
>>> 1) Is it necessary to create checkpoints? Or is there any other way to
>>> simply fast forward the simulation on a multi-core system?
>>>
>>> 2) If it is necessary to create checkpoints then can someone please
>>> confirm if the following commands are correct. I am able to follow step (a)
>>> and (b) but most of the SPEC benchmarks are failing when I run step (c).
>>>  (a) Create checkpoint for each of the simpoint:
>>> build/X86/gem5.opt configs/example/se.py
>>> --take-simpoint-checkpoint=m5out/simpoints/libq/libq.simpoint,m5out/simpoints/libq/libq.weight,300,1000
>>> --cmd="benchmarks/ben/libquantum_base.amd64-m64-gcc43-nn" --options="1397
>>> 8" --cpu-type=DerivO3CPU --l1d_size=32kB --l1i_size=32kB --l2_size=256kB
>>> --caches --l2cache --l3cache --l3_size=8MB --num-cpus=1 --mem-size=8192MB
>>> (b) Run checkpoint_aggregator script to aggregate the checkpoints which
>>> would run on 4 different cores (I am running the same checkpoint on all the
>>> 4 cores):
>>> python util/checkpoint_aggregator.py -o
>>> /home/sakshi/workspace2/gem5-63325e5b0a9d-modified/m5out/libq_cpt/cpt.None.4
>>> -c --cpts
>>> /home/sakshi/workspace2/gem5-63325e5b0a9d-modified/m5out/libq_cpt/cpt.simpoint_03_inst_11_weight_0.069900_interval_300_warmup_1000/
>>> /home/sakshi/workspace2/gem5-63325e5b0a9d-modified/m5out/libq_cpt/cpt.simpoint_03_inst_11_weight_0.069900_interval_300_warmup_1000/
>>> /home/sakshi/workspace2/gem5-63325e5b0a9d-modified/m5out/libq_cpt/cpt.simpoint_03_inst_11_weight_0.069900_interval_300_warmup_1000/
>>> /home/sakshi/workspace2/gem5-63325e5b0a9d-modified/m5out/libq_cpt/cpt.simpoint_03_inst_11_weight_0.069900_interval_300_warmup_1000/
>>> --memory-size 8589934592
>>> (c) Run the simulation in atomic mode and restore it to the normal mode
>>> (i.e. Timing+O3) from the aggregated checkpoint:
>>> build/X86/gem5.opt configs/example/se.py --at-instruction
>>> --checkpoint-restore=4 --restore-with-cpu=detailed --checkpoint-dir
>>> /home/sakshi/workspace2/gem5-63325e5b0a9d-modified/m5out/libq_cpt/
>>> --cmd="benchmarks/ben/libquantum_base.amd64-m64-gcc43-nn;benchmarks/ben/libquantum_base.amd64-m64-gcc43-nn;benchmarks/ben/libquantum_base.amd64-m64-gcc43-nn;benchmarks/ben/libquantum_base.amd64-m64-gcc43-nn"
>>> --options="1397 8;1397 8;1397 8;1397 8" --cpu-type=DerivO3CPU
>>> --l1d_size=32kB --l1i_size=32kB --l2_size=256kB --caches --l2cache
>>> --l3cache --l3_size=8MB --num-cpus=4 --mem-size=8192MB -I 1
>>>
>>> Regards,
>>> Sakshi
>>>
>> ___
>> gem5-users mailing list
>> gem5-users@gem5.org
>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
> ___
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Re: [gem5-users] Cache Management

2018-08-05 Thread Timon Evenblij
Hi Abishek,

Everything is possible, it all depends on the cache policy. I think the
default behavior in gem5 is a write-back cache, and I am not sure if any
other policies are implemented (Can someone else confirm?). A write-back
cache only writes the data back upon eviction, unlike a write-trough cache
were all levels are updated at write time. So, for your example: if both L1
and L2 are write-back caches, then the block in L2 gets updated after
eviction from L1. Only later, when the block gets evicted from L2, then the
content is written in main-memory.

Best regards

On Sun, Aug 5, 2018 at 3:59 PM Abhishek Singh <
abhishek.singh199...@gmail.com> wrote:

> Hi Timon,
> I had one question eviction of write back.
> What happens when a dirty block is evicted from L1 cache. Does it check L2
> cache updates the content of that block in L2 and then goes to memory and
> update contents in memory ?
>
> On Thu, Aug 2, 2018 at 4:04 AM Timon Evenblij 
> wrote:
>
>> Hi Abishek,
>>
>> No, for this case, MSHRs (miss status handling registers) exists. These
>> are registers that keep track of missed cache accesses (in your case packet
>> 1 that misses in L1), so the cache can be freed to reply to other accesses
>> (packet 2) while waiting for the answer of the miss (packet 1 gets answered
>> from L2 or even further away).
>>
>> Best regards,
>>
>> Timon
>>
>> On Thu, Aug 2, 2018 at 2:30 AM Abhishek Singh <
>> abhishek.singh199...@gmail.com> wrote:
>>
>>> My question is simple if there are two packets wants to access L1 cache
>>> in a system of 2 level cache and cpu is o3. Will packet 2 has to wait for
>>> packet 1 to get its response(packet 1) from L2 in case of L1 cache miss and
>>> L2 cache hit?
>>> What happen if its L2 miss?
>>>
>> ___
>>> gem5-users mailing list
>>> gem5-users@gem5.org
>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>
>> ___
>> gem5-users mailing list
>> gem5-users@gem5.org
>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
> ___
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Re: [gem5-users] Cache Management

2018-08-02 Thread Timon Evenblij
Hi Abishek,

No, for this case, MSHRs (miss status handling registers) exists. These are
registers that keep track of missed cache accesses (in your case packet 1
that misses in L1), so the cache can be freed to reply to other accesses
(packet 2) while waiting for the answer of the miss (packet 1 gets answered
from L2 or even further away).

Best regards,

Timon

On Thu, Aug 2, 2018 at 2:30 AM Abhishek Singh <
abhishek.singh199...@gmail.com> wrote:

> My question is simple if there are two packets wants to access L1 cache in
> a system of 2 level cache and cpu is o3. Will packet 2 has to wait for
> packet 1 to get its response(packet 1) from L2 in case of L1 cache miss and
> L2 cache hit?
> What happen if its L2 miss?
> ___
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

[gem5-users] Full system determinism

2018-07-30 Thread Timon Evenblij
Hi all,

I recently ran some parsec benchmarks on ARM in full-system mode, to
evaluate the performance hit of a couple of scenarios using a cache with
higher latencies. However, I found that in some cases, the performance
increased instead of decreased  (up to 20% lower execution time!), while
running the exact same benchmark.I would think this is too indeterminism in
full system mode, but
https://www.mail-archive.com/gem5-users@gem5.org/msg12088.html suggests
indeterminism should be limited to system calls only. Since parsec is
commonly used as a benchmarking application, I would think there should be
no indeterminism, or at least very limited? Running multiple runs of parsec
and averaging the results would be too time consuming in a simulator.

If anyone can comment to clear things up, that would probably help a lot of
people, including me!

Best regards,

Timon
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Re: [gem5-users] How to attach multiple disk images a simulation with gem5 fs.py?

2018-06-26 Thread Timon Evenblij
Hi Ciro,

While I did not got the time to check out exactly how I succeeded
previously, I found an approach explained in http://www.gem5.org/AsimBench.
I think I did it this way too. The example here is for android but it is
the same for linux.

Regards

Timon

On Fri, Jun 15, 2018 at 6:44 PM Jason Lowe-Power 
wrote:

> Hi Ciro,
>
> I'm not sure if you can do it with fs.py (I bet not) :).
>
> When you set the ide controller up (e.g., pc.south_bridge.ide.disks) it
> takes a python list of length 2 of disk images.
>
> Cheers,
> Jason
>
> On Fri, Jun 15, 2018 at 6:43 AM Ciro Santilli 
> wrote:
>
>> Thanks for confirming,
>>
>> Feel free to CC me directly if you end up submitting a patch.
>>
>> On Fri, Jun 15, 2018 at 1:37 PM, Timon Evenblij > > wrote:
>>
>>> With fs.py, I had it working at some point with a small ugly hack to
>>> FSConfig.py I think. It is on another machine so I cannot check right now.
>>> I will probably make a cleaner way of doing this in the near future.
>>>
>>> However, the same method did not apply to a custom full-system script I
>>> am working on, so I am still investigating.
>>>
>>> On Thu, Jun 14, 2018 at 7:23 PM Ciro Santilli 
>>> wrote:
>>>
>>>> At https://www.mail-archive.com/gem5-users@gem5.org/msg15233.html
>>>> Jason mentioned the technique of attaching two disk images to restore
>>>> a checkpoint and run a different benchmark.
>>>>
>>>> Is it possible to specify multiple disk images when using fs.py? From
>>>> the source code I don't think it is currently supported, but just
>>>> double checking before I decided to patch it or not.
>>>>
>>>> It seems that multiple --disk-image= options just overwrite one another.
>>>>
>>>> gem5 60600f09c25255b3c8f72da7fb49100e2682093a
>>>> ___
>>>> gem5-users mailing list
>>>> gem5-users@gem5.org
>>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>
>>>
>>> ___
>>> gem5-users mailing list
>>> gem5-users@gem5.org
>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>
>>
>> ___
>> gem5-users mailing list
>> gem5-users@gem5.org
>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
> ___
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Re: [gem5-users] How to attach multiple disk images a simulation with gem5 fs.py?

2018-06-15 Thread Timon Evenblij
With fs.py, I had it working at some point with a small ugly hack to
FSConfig.py I think. It is on another machine so I cannot check right now.
I will probably make a cleaner way of doing this in the near future.

However, the same method did not apply to a custom full-system script I am
working on, so I am still investigating.

On Thu, Jun 14, 2018 at 7:23 PM Ciro Santilli 
wrote:

> At https://www.mail-archive.com/gem5-users@gem5.org/msg15233.html
> Jason mentioned the technique of attaching two disk images to restore
> a checkpoint and run a different benchmark.
>
> Is it possible to specify multiple disk images when using fs.py? From
> the source code I don't think it is currently supported, but just
> double checking before I decided to patch it or not.
>
> It seems that multiple --disk-image= options just overwrite one another.
>
> gem5 60600f09c25255b3c8f72da7fb49100e2682093a
> ___
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Re: [gem5-users] cache measurement within FS emulation

2018-05-03 Thread Timon Evenblij
Hi Andreas,

You can just call /sbin/m5 dumpresetstats from within your runscript before
each benchmark.
The dumped stats will contain all cache related metrics.

regards

Timon

On Thu, May 3, 2018 at 3:52 PM Andreas Konopik 
wrote:

> Dear gem5-devs,
>
> I would like to start, stop and output cache hits/misses from within a
> full system emulation at the start and end of a benchmarking program.
> I.e. the total cache hits/misses for every cache since the beginning of
> the benchmark.
>
> Can you give me any hints on where to start?
>
> I was thinking about redirecting an access to a certain address to a
> function triggering the start/stop of the cache measurement.
>
> Best regards,
>
> Andreas Konopik
>
> ___
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

[gem5-users] cache bank contention

2018-04-10 Thread Timon Evenblij
Hi all,

I have some questions regarding how gem5 models cache banks. In fact, I
cannot find that gem5 models cache banks at all. Is this true?

Why this is important:
It looks as of right now that gem5 caches can process all requests in
parallel, unless the requests go to the same cache block. This looks like
true multiport caches. This seems too optimistic, since most caches are not
true multiported (only the register file is), but rather multibanked.
Multibanked caches mean that accesses to different banks can be processed
in parallel, but accesses to the same bank have to be executed
sequentially. For more information, this paper gives a good overview:
Niar, S., Eeckhout, L., & De Bosschere, K. (2003). Comparing Multiported
Cache Schemes. In *PDPTA* (pp. 1179-1185).

So are my assumptions true that gem5 just processes all cache requests in
parallel, even if they would go to the same bank? This would be rather
wrong, so I think I am missing something.

Feel free to comment.

Best regards,


Timon
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

[gem5-users] PARSEC illegal instruction

2018-03-30 Thread Timon Evenblij
Hi all,

So I cross-compiled some parsec bechmarks, e.g. ferret. First I tried
putting them in the disk image that gem5 uses to boot, but that did not
work out (inodes were not readable or something, see my other mail thread).
Jason suggested then to use a second disk image and add it to the
simulation. In the simulation, mount the disk and proceed from there.

So I executed this approach, which works better, as I can execute the
commands for the benchmark. However, I get an error saying illegal
instruction on the line where parsecmngmt tries to execute the benchmark
itself:



The file command gives the following result:

> file pkgs/apps/ferret/inst/arm-linux.gcc-hooks/bin/ferret
> pkgs/apps/ferret/inst/arm-linux.gcc-hooks/bin/ferret: ELF 32-bit LSB
> executable, ARM, version 1 (SYSV), statically linked, for GNU/Linux 2.6.32,
> not stripped


Which looks fine to me, as I want static 32 bit armv7 binaries to run on
gem5 ARMv7 simulations.
Any suggesting as to what mistake I could have made? Or could it be that
parsec has no support for armv7 on gem (some crucial instruction not
implemented? But this seems unlikely)

Best regards

Timon
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Re: [gem5-users] Full-system restoring from checkpoint with different runscript

2018-03-26 Thread Timon Evenblij
Hi Jason

How would I execute that in practice? I assume I could specify a second
disk in the system configuration files, which would then show up inside
gem5 as something like dev/sdb? Then I could mount it inside gem5 with
sbin/mount, cd to the mount directory and run from there?

Regards

Timon

On Fri, Mar 23, 2018 at 3:31 PM, Jason Lowe-Power 
wrote:

> Hi Timon,
>
> Good to hear.
>
> Rather than starting with a different disk, what I usually do is have two
> disk images. One for boot and one for the workloads. After I resume from
> the checkpoint, I then mount the second disk with the workloads on it.
>
> Jason
>
> On Fri, Mar 23, 2018 at 7:18 AM Timon Evenblij 
> wrote:
>
>> Thanks, the hack_back script works great!
>> Another follow up question, can we resume checkpoints with different disk
>> images? I guess this one is trickier, but if the boot related files are not
>> changed, this should work right, since all architectural state is the same
>> then.
>> I have tried this and it seems to be working, but I want to be sure I
>> don't run into issues because of this.
>>
>> Regards
>>
>> Timon
>>
>> On Wed, Mar 21, 2018 at 4:47 PM, Ciro Santilli 
>> wrote:
>>
>>> On Wed, Mar 21, 2018 at 10:12 AM, Timon Evenblij
>>>  wrote:
>>> > Hi all,
>>> >
>>> > A quick question: Is it possible to restore from a checkpoint with a
>>> > different runscript then used during the first boot?
>>> > This way, I could run a lot of benchmarks without losing time waiting
>>> for
>>> > gem5 to boot.
>>> > I know I could boot interactively and then checkpoint, but restoring
>>> then
>>> > requires me to use m5term and execute the benchmark command manually,
>>> which
>>> > is a pain if I want to do a lot of benchmark simulations in parallel.
>>> >
>>>
>>> I'd just use the checkpoints and expect as mentioned at:
>>> https://stackoverflow.com/questions/7013137/automating-
>>> telnet-session-using-bash-scripts
>>>
>>> E.g.:
>>>
>>> #!/usr/bin/expect
>>> spawn telnet localhost 3456
>>> expect "# $"
>>> send "pwd\r"
>>> send "ls /\r"
>>> send "m5 exit\r"
>>> expect eof
>>>
>>> > Regards
>>> >
>>> > Timon
>>> >
>>> > ___
>>> > gem5-users mailing list
>>> > gem5-users@gem5.org
>>> > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>> ___
>>> gem5-users mailing list
>>> gem5-users@gem5.org
>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>
>>
>> ___
>> gem5-users mailing list
>> gem5-users@gem5.org
>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
>
> ___
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Re: [gem5-users] adding benchmarks to disk images results in unreadable inode blocks

2018-03-26 Thread Timon Evenblij
Hi Ciro

I made a copy of an existing example disk image found on gem5's website:
e.g. aarch32-ubuntu-natty-headless.img.
I increased the size of it so it can accomodate the parsec suite, e.g.:

dd if=/dev/zero bs=1G count=20 >> ./image.img

Then I mount the image:

Sudo mount -o loop,offset=32256 image.img tmp_mountdir

Then I resize the partition (df -h to confirm):

Df -h
Resize2fs /dev/loop0

Df -h

I copy the files:

Sudo cp -r parsec_dir mountdir/home/root/
to make sure its not related to permissions:

Su root
Chmod -R o=u parsec_dir
Chmod -R g=u parsec_dir


Then I unmount:

Sudo umount mountdir


Everything looks fine when the disk is mounted outside gem5, but in gem5
the parsec pieces seem to be unreadable.


On Fri, Mar 23, 2018 at 7:30 PM, Ciro Santilli 
wrote:

> I have successfully run PARSEC with this setup:
> https://github.com/cirosantilli/linux-kernel-module-cheat/tree/
> 29908dffb2726b0819fdf95240ae513dddb8af48#parsec-benchmark
> and never encountered those problems.
>
> Please also provide more detailed reproduction steps if you can.
>
> On Fri, Mar 23, 2018 at 1:45 PM, Timon Evenblij
>  wrote:
> > Hi all,
> >
> > I have some issues regarding full-system simulation. I want to add some
> > benchmarks to an image file so I can run them. I can resize an image
> file,
> > mount it, add (cross)compiled benchmarks to it, e.g. parsec without
> > problems. But when I boot gem5 on that disk image, trying to run a
> benchmark
> > always result in some error that the inode/file cannot be read. Even a
> > simple ls is a problem:
> >
> >
> >
> > root@gem5sim:/home/root/parsec-3.0# ll
> > [3.367737] EXT2-fs (vda1): error: ext2_get_inode: unable to read
> inode
> > block - inode=430081, block=6881283
> > ls: cannot access CONTRIBUTORS: Input/output error
> > [3.368723] EXT2-fs (vda1): error: ext2_get_inode: unable to read
> inode
> > block - inode=430082, block=6881283
> > ls: cannot access ext: Input/output error
> > [3.368878] EXT2-fs (vda1): error: ext2_get_inode: unable to read
> inode
> > block - inode=430270, block=6881330
> > ls: cannot access .parsec_uniquefile: Input/output error
> > [3.369019] EXT2-fs (vda1): error: ext2_get_inode: unable to read
> inode
> > block - inode=434783, block=6955034
> > ls: cannot access config: Input/output error
> > [3.369156] EXT2-fs (vda1): error: ext2_get_inode: unable to read
> inode
> > block - inode=430271, block=6881330
> > ls: cannot access LICENSE: Input/output error
> > [3.369297] EXT2-fs (vda1): error: ext2_get_inode: unable to read
> inode
> > block - inode=435201, block=6963203
> > ls: cannot access bin: Input/output error
> > [3.369434] EXT2-fs (vda1): error: ext2_get_inode: unable to read
> inode
> > block - inode=430272, block=6881330
> > ls: cannot access README: Input/output error
> > [3.369571] EXT2-fs (vda1): error: ext2_get_inode: unable to read
> inode
> > block - inode=430273, block=6881331
> > ls: cannot access CHANGELOG: Input/output error
> > [3.369709] EXT2-fs (vda1): error: ext2_get_inode: unable to read
> inode
> > block - inode=430274, block=6881331
> > ls: cannot access env.sh: Input/output error
> >
> > I tried changing permissions when copying the files, but that didn't
> work.
> > Has anyone encountered a similar error and has some insight to share?
> > Perhaps it is related to resizing the image and the partition in it, but
> I'm
> > not sure.
> >
> > Best regards
> >
> > Timon
> >
> >
> > ___
> > gem5-users mailing list
> > gem5-users@gem5.org
> > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
> ___
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Re: [gem5-users] Full-system restoring from checkpoint with different runscript

2018-03-23 Thread Timon Evenblij
Thanks, the hack_back script works great!
Another follow up question, can we resume checkpoints with different disk
images? I guess this one is trickier, but if the boot related files are not
changed, this should work right, since all architectural state is the same
then.
I have tried this and it seems to be working, but I want to be sure I don't
run into issues because of this.

Regards

Timon

On Wed, Mar 21, 2018 at 4:47 PM, Ciro Santilli 
wrote:

> On Wed, Mar 21, 2018 at 10:12 AM, Timon Evenblij
>  wrote:
> > Hi all,
> >
> > A quick question: Is it possible to restore from a checkpoint with a
> > different runscript then used during the first boot?
> > This way, I could run a lot of benchmarks without losing time waiting for
> > gem5 to boot.
> > I know I could boot interactively and then checkpoint, but restoring then
> > requires me to use m5term and execute the benchmark command manually,
> which
> > is a pain if I want to do a lot of benchmark simulations in parallel.
> >
>
> I'd just use the checkpoints and expect as mentioned at:
> https://stackoverflow.com/questions/7013137/automating-
> telnet-session-using-bash-scripts
>
> E.g.:
>
> #!/usr/bin/expect
> spawn telnet localhost 3456
> expect "# $"
> send "pwd\r"
> send "ls /\r"
> send "m5 exit\r"
> expect eof
>
> > Regards
> >
> > Timon
> >
> > ___
> > gem5-users mailing list
> > gem5-users@gem5.org
> > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
> ___
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

[gem5-users] adding benchmarks to disk images results in unreadable inode blocks

2018-03-23 Thread Timon Evenblij
Hi all,

I have some issues regarding full-system simulation. I want to add some
benchmarks to an image file so I can run them. I can resize an image file,
mount it, add (cross)compiled benchmarks to it, e.g. parsec without
problems. But when I boot gem5 on that disk image, trying to run a
benchmark always result in some error that the inode/file cannot be read.
Even a simple ls is a problem:



root@gem5sim:/home/root/parsec-3.0# ll
[3.367737] EXT2-fs (vda1): error: ext2_get_inode: unable to read inode
block - inode=430081, block=6881283
ls: cannot access CONTRIBUTORS: Input/output error
[3.368723] EXT2-fs (vda1): error: ext2_get_inode: unable to read inode
block - inode=430082, block=6881283
ls: cannot access ext: Input/output error
[3.368878] EXT2-fs (vda1): error: ext2_get_inode: unable to read inode
block - inode=430270, block=6881330
ls: cannot access .parsec_uniquefile: Input/output error
[3.369019] EXT2-fs (vda1): error: ext2_get_inode: unable to read inode
block - inode=434783, block=6955034
ls: cannot access config: Input/output error
[3.369156] EXT2-fs (vda1): error: ext2_get_inode: unable to read inode
block - inode=430271, block=6881330
ls: cannot access LICENSE: Input/output error
[3.369297] EXT2-fs (vda1): error: ext2_get_inode: unable to read inode
block - inode=435201, block=6963203
ls: cannot access bin: Input/output error
[3.369434] EXT2-fs (vda1): error: ext2_get_inode: unable to read inode
block - inode=430272, block=6881330
ls: cannot access README: Input/output error
[3.369571] EXT2-fs (vda1): error: ext2_get_inode: unable to read inode
block - inode=430273, block=6881331
ls: cannot access CHANGELOG: Input/output error
[3.369709] EXT2-fs (vda1): error: ext2_get_inode: unable to read inode
block - inode=430274, block=6881331
ls: cannot access env.sh: Input/output error

I tried changing permissions when copying the files, but that didn't work.
Has anyone encountered a similar error and has some insight to share?
Perhaps it is related to resizing the image and the partition in it, but
I'm not sure.

Best regards

Timon
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

[gem5-users] Full-system restoring from checkpoint with different runscript

2018-03-21 Thread Timon Evenblij
Hi all,

A quick question: Is it possible to restore from a checkpoint with a
different runscript then used during the first boot?
This way, I could run a lot of benchmarks without losing time waiting for
gem5 to boot.
I know I could boot interactively and then checkpoint, but restoring then
requires me to use m5term and execute the benchmark command manually, which
is a pain if I want to do a lot of benchmark simulations in parallel.

Regards

Timon
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

[gem5-users] M5threads and a detailed cpu model (O3 and Minor)

2018-02-08 Thread Timon Evenblij
Hi all,

I am looking into simulating some multithreaded benchmarks in se mode. I
compiled m5threads both for x86 and arm. Running binaries linked to
m5threads works fine natively, as well as when simulating a processor in
the atomic model. However, when simulating an* out-of-order detailed model *the
simulation hangs for some tests (e.g. test_malloc, test_lock, test_pthread
of the included tests in m5threads). I am not sure why, since the code is
very similar to other tests.
Does anyone know of m5threads and O3 models not being compatible?

As a somewhat related problem, the *arm MinorCPU model* (there is no x86
minor model) crashes for every test involving m5threads, so compatibility
is even worse there. (panic: page table fault)

In general, the question is: how come selecting a different cpu model has
such a big influence on running a multithreaded application?

Best regards

Timon
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

[gem5-users] Different cacheline size for instruction cache

2018-02-06 Thread Timon Evenblij
Hi all,

I'd like to model an L1 instruction cache with a smaller cache line size
then the rest of the caches (L1 data cache, L2 cache, ...). After searching
a little bit, it seems like the cacheline size is specified system-wide,
and questions related to different cache line sizes for L2 caches have been
answered that the memory system needs to be (rather significantly) altered
if needing different cacheline sizes on different levels of the cache.
However, since my questions is related to the instruction cache only,
perhaps someone has an idea on how to make this change with little effort?

Kind regards

Timon
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

[gem5-users] Simulation on multiple cores

2018-01-29 Thread Timon Evenblij
Hi all,

I have been reading into using multiple threads for a system simulation,
but so far, the only existing option is dist-gem5, but this limits the
parallel simulation to distributed systems if I am correct. Am I missing
something or are all simulations where 1 (multicore or not) machine is
simulated, simulated on a single thread?

I have seen references to parallel-gem5 here and there (e.g.
http://gem5.org/wiki/images/2/2d/Isca2017-dist-gem5.pdf ), but
http://www.m5sim.org/Parallel_M5 seems to point out this is not fully
functional?

Is there anyone that could gave a quick overview?

Best regards


Timon
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Re: [gem5-users] Switching between Fastforwarding, Warmup, Detailed: Sampling long benchmarks

2018-01-29 Thread Timon Evenblij
Hi Jason,

Thanks for the reply. As it turns out, it seemed that my previous attempt
failed because I didn't specify the itb.walker.port and the
dtb.walker.port. This wasn't required for my previous simulation scripts so
I forgot to specify them.
Also, a final question: how useful is it to specify something like
new_cpu.system = system before swithcing to the new cpu?
I have seen it used sometimes, but in my experiments it does not change
anything.

Cheers
Timon

On Fri, Jan 26, 2018 at 12:59 AM, Jason Lowe-Power 
wrote:

> Hi Timon,
>
> To answer your question: Yes. I have succeeded in writing scripts to
> switch between atomic and detailed mode. In fact, you can write scripts
> that do much more complicated things as well. For an example, you can check
> out my github repo: https://github.com/jlpresearch/gem5/tree/jason/
> kvm-testing/configs/myconfigs. The sample.py file has a complex forking
> and sampling example. Note, this is all with full-system mode, but you can
> use it as an example to extend an SE script.
>
> To accomplish something that se.py doesn't have built-in I strongly
> recommend everyone write a runscript from scratch. If you haven't yet, I
> would check out my documentation on how the runscripts work in my Learning
> gem5 book: http://learning.gem5.org/. As a shameless plug, I'm going to
> be giving a Learning gem5 tutorial as ASPLOS this year that will cover
> this, too.
>
> Basically, you'll have to call m5.switchCpus from your own script or from
> a modified se.py. The documentation for this isn't great. The code is
> probably your best bet. The code for switching CPUs is in
> src/python/m5/simulate.py.
>
> Let us know if you have more questions!
>
> Cheers,
> Jason
>
>
>
> On Thu, Jan 25, 2018 at 4:48 AM Timon Evenblij 
> wrote:
>
>> Hi all,
>>
>> I have some questions regarding the switching of CPU models during
>> simulation.
>> The se.py script provides some useful options, but does not seem to offer
>> me what I (and with my I guess a lof others) want: The ability to sample a
>> long benchmark by alternating between fastforwarding (the atomic cpu
>> model), warmup (the timing cpu model) and detailed simulation (the detailed
>> cpu model) for a number of times. the script only offers to fastforward to
>> detailed execution, or to warmup before detailed execution.
>> Fastforward,warmup, and detailed execution does not work, and making this
>> switch multiple times in one benchmark run also does not. The
>> --repeat-switch option cannot be used together with the warmup option for
>> example.
>>
>> I tried to implement this in a python configuration script myself based
>> on what I learned from the Simulation.py script, but I cannot get it to
>> work. Has anyone ever succeeded on this before, or knows of a way to do
>> this, as this seems to be fairly basic functionality in a simulator?
>>
>> Any comments are appreciated.
>>
>> Best regards
>>
>> Timon
>> ___
>> gem5-users mailing list
>> gem5-users@gem5.org
>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
>
> ___
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

[gem5-users] Switching between Fastforwarding, Warmup, Detailed: Sampling long benchmarks

2018-01-25 Thread Timon Evenblij
Hi all,

I have some questions regarding the switching of CPU models during
simulation.
The se.py script provides some useful options, but does not seem to offer
me what I (and with my I guess a lof others) want: The ability to sample a
long benchmark by alternating between fastforwarding (the atomic cpu
model), warmup (the timing cpu model) and detailed simulation (the detailed
cpu model) for a number of times. the script only offers to fastforward to
detailed execution, or to warmup before detailed execution.
Fastforward,warmup, and detailed execution does not work, and making this
switch multiple times in one benchmark run also does not. The
--repeat-switch option cannot be used together with the warmup option for
example.

I tried to implement this in a python configuration script myself based on
what I learned from the Simulation.py script, but I cannot get it to work.
Has anyone ever succeeded on this before, or knows of a way to do this, as
this seems to be fairly basic functionality in a simulator?

Any comments are appreciated.

Best regards

Timon
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Re: [gem5-users] Configuration visualizer

2018-01-04 Thread Timon Evenblij
Thanks for the answer! I thought I had installed pydot but apparently not.
Installing pydot allows generating the visual config files, but it
generates only svg. for pdf's it shows the following error:


['dot', '-Tpdf', '/tmp/tmpByuGfL'] return code: 1

stdout, stderr:

Format: "pdf" not recognized. Use one of: canon cmap cmapx cmapx_np dot eps
fig gd gd2 gif gv imap imap_np ismap jpe jpeg jpg plain plain-ext png ps
ps2 svg svgz tk vml vmlz vrml wbmp xdot


warn: failed to generate dot output from m5out/config.dot

Do I have to install something else? It seems like pydot does not support
the pdf format by default.

Best regards

Timon



On Wed, Jan 3, 2018 at 3:33 PM, 조해윤  wrote:

> Dear, Timon
>
> Install pydot, and then rebuild gem5 and run simulation.
> Then, you can see config.dot.pdf file which has the content like below.
> [image: 본문 이미지 1]
>
> Best regards
>
> Haeyoon Cho
>
> 2018-01-03 23:06 GMT+09:00 Timon Evenblij :
>
>> Hi all,
>>
>> I thought I once came across a tool to visualize the configuration used
>> for a simulation in gem5, but I didn't look into it at the moment. Right
>> now, this would be very useful, especially to visualize the configuration
>> used for the memory hierarchy (i.e. how all memory objects are connected
>> with all the ports). However, I cannot seem to find it. Did I misunderstood
>> that such a tool exists, or can somebody point me into the right direction
>> where to find it?
>>
>> Otherwise, I would perhaps create a tool like that, so any tips or
>> pitfalls are welcome as well.
>>
>> Best regards
>>
>> Timon
>>
>> ___
>> gem5-users mailing list
>> gem5-users@gem5.org
>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>
>
>
> ___
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

[gem5-users] Configuration visualizer

2018-01-03 Thread Timon Evenblij
Hi all,

I thought I once came across a tool to visualize the configuration used for
a simulation in gem5, but I didn't look into it at the moment. Right now,
this would be very useful, especially to visualize the configuration used
for the memory hierarchy (i.e. how all memory objects are connected with
all the ports). However, I cannot seem to find it. Did I misunderstood that
such a tool exists, or can somebody point me into the right direction where
to find it?

Otherwise, I would perhaps create a tool like that, so any tips or pitfalls
are welcome as well.

Best regards

Timon
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

[gem5-users] Regression tests

2017-12-21 Thread Timon Evenblij
Hi all,

It seems like the regression tests don't pass at all in the recent gem5
builds?
Are they still being used/developed or are they all outdated?
The wiki page  about the regression
tests is a little old (2015), so I thought I'd ask it over here.

Regards

Timon
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Re: [gem5-users] About multiple cache copies and a related comment called "on the same path to memory"

2017-12-19 Thread Timon Evenblij
Hi gjins,

To the best of my knowledge, your reasoning is correct. If a packet goes
from cpu to the memory, it passes the local caches and then the shared
caches on its way to memory. Local caches from other cpu's are not passed,
thus meaning they are not on the path to memory.
It could be interesting to look a little further into the MOESI cache
coherence protocol, since that is the coherence protocol used by default by
the classic cache system in gem5.

Regards,

Timon

On Tue, Dec 19, 2017 at 1:23 AM, Gongjin Sun  wrote:

> Hi All,
>
> I noticed that there are some useful comments in the file cache.cc as like
> these:
>
> "// if a cache is responding, and it had the line in Owned
> // rather than Modified state, we need to invalidate any
> // copies that are not on the same path to memory
> "
> "// we get away with multiple caches (on
> // the same path to memory) considering
> // the block writeable as we always enter
> // the cache hierarchy through a cache,
> // and first snoop upwards in all other
> // branches"
>
> What is the meaning of "on the same path to memory"?
>
> Assume we have two cpus and 3 cache levels. The third level is shared by
> these two cpus. And packet is in the level 2 (L2) of cpu1 currently. If I
> understand it correctly, taking the first comment for example,
>
> the cache which is responding is L1 of cpu1, the "on the same path to
> memory" means the path from current L2 of cpu1 to to L3 to memory and the
> copies which need to be invalidated should be the ones from L1, L2 of cpu2
> (not including the copies of L3) . Is my understanding correct? Please
> correct me and clarify it if not.
>
> Thanks in advance!
>
> gjins
>
>
> ___
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Re: [gem5-users] Build issues using non-default location for dependencies

2017-12-01 Thread Timon Evenblij
Hi,

It turned out it works right now, and it probably has something to do with
me trying to run scons with the --config=force option before all the time.
It looks like without that option, the build works. For the final linking
phase, another entry to LD_LIBRARY_PATH was made to remove all errors, but
it is the config option that turned out to be a real problem. If I run my
build now (after cleaning and removing gem5/build)
without the config=force option, everything builds fine, but if I run it
with config=force, the build crashed very quickly complaining about files
not found.

So I got a little suspicious, since the config=force option should just let
scons know to re-evaluate its configuration tests (as stated on the
documentation of scons <http://scons.org/doc/2.5.1/HTML/scons-man.html>).
If between builds, no configuration is changed, this should not make a
difference at all, right?
Then why is the build not working? I think this may be a bug somewhere.

On Wed, Nov 29, 2017 at 9:44 AM, Timon Evenblij 
wrote:

> Hi all,
>
>
>
> I am trying to build gem5 on a server system (RHEL6) where I don’t have
> nor will have administrator privileges. Normally that should not pose too
> much problems, as installing all dependencies can be done in user locations
> and pointed to using environment variables (as well as reading these
> environment variables in the SConstruct file). However, I am failing to get
> it working.
>
>
>
> Try 1: Using a system wide installed python 2.7 version allows me to build
> gem5 after disabling the python library checks (apparently, this
> system-wide python was compiled with tcltk8.6 and only 8.5 is now available
> on the system) but all tests fail (or they say that they are changed) and
> running a simple configuration scripts results in (Python) errors.
>
>
>
> Try 2: Using conda to set up a virtual python environment and running the
> build process from there finds all libraries, but the build crashes and
> says some file is not found. Cleaning the build and trying again results
> sometimes in another file that is not found. It is most of the time one of
> these: param/PowerModel.hh, param/VoltageDomain.hh, param/ThermalDomain.hh.
> Looking into the build process, these files should be generated during
> build (using the createSimObjectParamStruct function in src/SConscript).
> Indeed, printing out the names before executing the env.Command line to
> create the header file shows that these files should be created like all
> the other header files.
>
>
>
> I am quite puzzled as to where the problem could lie. Perhaps someone has
> seen similar problems, or experience with all non-default installation
> locations of dependencies. Any help is appreciated.
>
>
> Some more information about versions I used:
>
>- g++ version 5.4 (installed system-wide by admins, in non-default
>location)
>- anaconda 2 for python version 2.7 and necessary libraries in user
>folder
>- protobuf in user folder, version 3.4.0
>- scons 2.5.1 in user folder
>- swig 2.0.4 in user folder (although this should not be used anymore
>after the switch to pybind11 if I'm correct)
>- zlib 1.2.11 in user folder
>- m4 1.4.13 in default install location (/usr/bin/m4)
>
>
>
> Regards,
>
>
>
> Timon
>
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

[gem5-users] Build issues using non-default location for dependencies

2017-11-29 Thread Timon Evenblij
Hi all,



I am trying to build gem5 on a server system (RHEL6) where I don’t have nor
will have administrator privileges. Normally that should not pose too much
problems, as installing all dependencies can be done in user locations and
pointed to using environment variables (as well as reading these
environment variables in the SConstruct file). However, I am failing to get
it working.



Try 1: Using a system wide installed python 2.7 version allows me to build
gem5 after disabling the python library checks (apparently, this
system-wide python was compiled with tcltk8.6 and only 8.5 is now available
on the system) but all tests fail (or they say that they are changed) and
running a simple configuration scripts results in (Python) errors.



Try 2: Using conda to set up a virtual python environment and running the
build process from there finds all libraries, but the build crashes and
says some file is not found. Cleaning the build and trying again results
sometimes in another file that is not found. It is most of the time one of
these: param/PowerModel.hh, param/VoltageDomain.hh, param/ThermalDomain.hh.
Looking into the build process, these files should be generated during
build (using the createSimObjectParamStruct function in src/SConscript).
Indeed, printing out the names before executing the env.Command line to
create the header file shows that these files should be created like all
the other header files.



I am quite puzzled as to where the problem could lie. Perhaps someone has
seen similar problems, or experience with all non-default installation
locations of dependencies. Any help is appreciated.


Some more information about versions I used:

   - g++ version 5.4 (installed system-wide by admins, in non-default
   location)
   - anaconda 2 for python version 2.7 and necessary libraries in user
   folder
   - protobuf in user folder, version 3.4.0
   - scons 2.5.1 in user folder
   - swig 2.0.4 in user folder (although this should not be used anymore
   after the switch to pybind11 if I'm correct)
   - zlib 1.2.11 in user folder
   - m4 1.4.13 in default install location (/usr/bin/m4)



Regards,



Timon
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users