[gem5-users] Understanding cache output

2018-04-05 Thread Barbora Murinová
Hi all,

I've been running se.py with the arguments --caches --cacheline_size=8 on a
small program:

int a = 42;
int *p = &a;
*a = 10;

And trying to understand the data cache output for this piece of code. For
every access, the data cache claims to have a hit, although the first two
are supposed to be cold misses. No prefetching is enabled as far as I'm
aware. Do you know what could be causing this?

There is a lot of library setup and so on going on before, but that
shouldn't affect this?

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

Re: [gem5-users] please help

2018-04-05 Thread Raman Arora
Hi all,

I am pretty new to gem5 and been following the steps to work with the ruby
random tester, which are going fine.

I wish to work on the full system configuration and exact steps to follow
for building and executing the splash2x benchmarks, could anyone please
guide me on the same?

Any online web page which can detail the steps to get the stats file and
enable me to analyze the output would be great.

I have been executing the x86 benchmark for a term paper and would be
grateful if a resource pertaining to that architecture could be shared.

Thanks and Regards,

Raman

On Wed, Apr 4, 2018 at 8:09 PM, Krishna, Tushar 
wrote:

> Don’t remember if I responded already.
> This shows how to run NoC synthetic traffic sims :
> http://www.gem5.org/Garnet_Synthetic_Traffic
>
> This garnet implementation is here:
> http://www.gem5.org/Garnet2.0
>
> In the m5out.stats file, you can see the network stats.
> If you want additional stats, you can add additional fields to flit.hh -
> e.g, in your case, you may want a field in the flit that is tracking how
> many cycles it spent in each router. And print that out when it is ejected
> at the NetworkInterface.
>
> Look at Lifecycle of a Network Traversal to see what happens where in the
> code.
> http://www.gem5.org/Garnet2.0
>
> Cheers,
> Tushar
>
> On Apr 2, 2018, 8:45 AM -0400, mohammad etemad ,
> wrote:
>
> dear all,
>
> Hi,
> I want to calculate latency in interconnect network from each node to its
> neighbors dynamically.this task should be performed  for all nodes.which
> files should be modified and what shall we do?
>
>
> best regards
> M.Etemad
>
>
> ___
> 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] [EXT] Re: New image of Ubuntu 17.x with custom kernel (append build string -gem5) - kernel Panic

2018-04-05 Thread Ciro Santilli
I can't reproduce this problem with my setup.

As I mentioned previously, I successfully booted with:

./run -g -m 4G --  --mem-type=DDR4_2400_16x4 --mem-ranks=4 --caches
--l2cache --smt

which adds the --smt option, unless I made some mistake, I'll double check.

I've had never used the --smt option previously, what is it supposed to do?

On Thu, Apr 5, 2018 at 8:37 PM, Vitorio Cargnini (lcargnini) <
lcargn...@micron.com> wrote:

> Thanks Ciro,
>
>
>
> My guess it is the –smt parameter and X86 don’t work well together for
> some reason, I made an attempt using a Hello world and once I removed the
> –smt parameter it worked.
>
>
>
> Any taugths anybody ?
>
>
>
>
>
> *From:* gem5-users [mailto:gem5-users-boun...@gem5.org] *On Behalf Of *Ciro
> Santilli
> *Sent:* Wednesday, April 4, 2018 2:39 PM
> *To:* gem5 users mailing list 
> *Subject:* Re: [gem5-users] [EXT] Re: New image of Ubuntu 17.x with
> custom kernel (append build string -gem5) - kernel Panic
>
>
>
> Hi Vitorio,
>
>
>
> I don't know exactly what is the problem, but I can provide a setup that
> just works which might help you to diff it out: https://github.com/
> cirosantilli/linux-kernel-module-cheat/tree/e38a1dea9223bf4658384cbd93
> e748d728de#gem5-getting-started (replace arm with x86_64)
>
>
>
> My commands use X86/gem.out, but I've have just hacked up the scripts
> locally to use X86_MOESI_AMD_Base like you and it this just worked:
>
>
>
> ./run -g -m 4G --  --mem-type=DDR4_2400_16x4 --mem-ranks=4 --caches
> --l2cache --smt
>
>
>
> Previously I had some similar failures on x86 (not sure exactly the same),
> and they went away when I did the following:
>
>
>
> - get latest gem5 master, that test repo is at 68af229 via a submodule:
> https://github.com/cirosantilli/linux-kernel-module-cheat/tree/
> e38a1dea9223bf4658384cbd93e748d728de/gem5
>
> - use this kernel config: https://github.com/cirosantilli/linux-kernel-
> module-cheat/blob/e38a1dea9223bf4658384cbd93
> e748d728de/kernel_config_x86_64-gem5
>
>
>
> so maybe this is what you are missing.
>
>
>
> This is the patch I referred to:
>
>
>
> @@ -27,7 +27,7 @@ disks_dir="${system_dir}/disks"
>
>  mkdir -p "$binaries_dir" "$disks_dir"
>
>  cd "${top}/gem5"
>
>  if [ "$arch" = x86_64 ]; then
>
> -  scons -j "$j" --ignore-style build/X86/gem5.opt
>
> +  scons -j "$j" --ignore-style build/X86_MOESI_AMD_Base/gem5.opt
>
>f="${disks_dir}/linux-bigswap2.img"
>
>dd if=/dev/zero of="$f" bs=1024 count=65536
>
>mkswap "$f"
>
> --- a/run
>
> +++ b/run
>
> @@ -134,7 +134,7 @@ if "$gem5"; then
>
>gem5_common="\
>
>  M5_PATH='${gem5_build_dir}/system' \
>
>  ${debug_vm} \
>
> -'${gem5_src_dir}/build/${gem5_arch}/gem5.opt' \
>
> +'${gem5_src_dir}/build/X86_MOESI_AMD_Base/gem5.opt' \
>
>  --debug-file=trace.txt \
>
>  ${gem5opts} \
>
>  -d '${m5out_dir}' \
>
>
>
>
>
> On Wed, Apr 4, 2018 at 9:30 PM, Vitorio Cargnini (lcargnini) <
> lcargn...@micron.com> wrote:
>
> Ok,
>
> Thanks Ciro, I'll look into that, besides that I built a Gentoo image, and
> currently, I'm facing another roadblock, for some reason booting the
> images, on x86 at least I didn’t attempt it on ARM yet, it is next on the
> agenda, once It achieves the following point:
> [0.913616] ata1.01: configured for UDMA/33
> [0.913702] scsi 0:0:0:0: Direct-Access ATA  M5 IDE Disk
> n/a  PQ: 0 ANSI: 5
> [0.914223] sd 0:0:0:0: [sda] 131072000 512-byte logical blocks: (67.1
> GB/62.5 GiB)
> [0.914269] sd 0:0:0:0: [sda] Write Protect is off
> [0.914302] sd 0:0:0:0: [sda] Write cache: disabled, read cache:
> enabled, doesn't support DPO or FUA
> [0.914771] sd 0:0:0:0: Attached scsi generic sg0 type 0
> [0.914862]  sda: sda1
> [0.915256] sd 0:0:0:0: [sda] Attached SCSI disk
> [0.917970] scsi 0:0:1:0: Direct-Access ATA  M5 IDE Disk
> n/a  PQ: 0 ANSI: 5
> [0.918339] sd 0:0:1:0: [sdb] 1048320 512-byte logical blocks: (537
> MB/512 MiB)
> [0.918384] sd 0:0:1:0: [sdb] Write Protect is off
> [0.918417] sd 0:0:1:0: [sdb] Write cache: disabled, read cache:
> enabled, doesn't support DPO or FUA
> [0.918883] sd 0:0:1:0: Attached scsi generic sg1 type 0
> [0.919251] sd 0:0:1:0: [sdb] Attached SCSI disk
>
> It breaks, I got the following error on gem5 console
>
>
> [1226:lcargnini@rndarch11/home/user/gem5]> ./build/X86_MOESI_AMD_Base/gem5.opt
>  configs/user/fs.py --caches --l2cache --smt 
> --disk-image=`pwd`/disks/user-gentoo-gem5.img
> --kernel=`pwd`/binaries/vmlinuX-4.9.76-gentoo-r1-user-gem5
> --mem-type=DDR4_2400_16x4 --mem-size=4GB --mem-ranks=4
> gem5 Simulator System.  http://gem5.org
> gem5 is copyrighted software; use the --copyright option for details.
>
> gem5 compiled Mar 26 2018 18:01:36
> gem5 started Apr  4 2018 13:26:40
> gem5 executing on rndarch11, pid 26274
> command line: ./build/X86_MOESI_AMD_Base/gem5.opt configs/user/fs.py
> --caches --l2cache --smt 
> --disk-image=/home/user/gem5/disks/user-gentoo-gem5.img
> --kernel=/home/user/gem5/binaries/vmlinu

Re: [gem5-users] [EXT] Re: New image of Ubuntu 17.x with custom kernel (append build string -gem5) - kernel Panic

2018-04-05 Thread Ciro Santilli
I haven't managed to "solve" that error yet in the following sense:

- I would like to have a config that works for both QEMU and gem5, but I
haven't managed to find one yet
- using the config I pointed to: https://github.com/cir
osantilli/linux-kernel-module-cheat/blob/e38a1dea9223bf46583
84cbd93e748d728de/kernel_config_x86_64-gem5 , which I copied from
Jason, gem5 then works (but QEMU does not)

Let me know if you find a config that works for both QEMU and gem5.

On Thu, Apr 5, 2018 at 6:49 PM, Vitorio Cargnini (lcargnini) <
lcargn...@micron.com> wrote:

> Hi Ciro,
>
> Thanks again,  looking into your session 12.9.2 that it is exactly the
> error I have. However, it boots on my qemu since I installed the image
> contents using qemu.
>
>
>
> How did you solved the 12.9.2 issue?
>
> That it is the same issue, I just went forward in my boot flow.
>
>
>
> Regards,
>
> Vitorio.
>
>
>
> *From:* gem5-users [mailto:gem5-users-boun...@gem5.org] *On Behalf Of *Ciro
> Santilli
> *Sent:* Wednesday, April 4, 2018 2:39 PM
> *To:* gem5 users mailing list 
> *Subject:* Re: [gem5-users] [EXT] Re: New image of Ubuntu 17.x with
> custom kernel (append build string -gem5) - kernel Panic
>
>
>
> Hi Vitorio,
>
>
>
> I don't know exactly what is the problem, but I can provide a setup that
> just works which might help you to diff it out: https://github.com/
> cirosantilli/linux-kernel-module-cheat/tree/e38a1dea9223bf4658384cbd93
> e748d728de#gem5-getting-started (replace arm with x86_64)
>
>
>
> My commands use X86/gem.out, but I've have just hacked up the scripts
> locally to use X86_MOESI_AMD_Base like you and it this just worked:
>
>
>
> ./run -g -m 4G --  --mem-type=DDR4_2400_16x4 --mem-ranks=4 --caches
> --l2cache --smt
>
>
>
> Previously I had some similar failures on x86 (not sure exactly the same),
> and they went away when I did the following:
>
>
>
> - get latest gem5 master, that test repo is at 68af229 via a submodule:
> https://github.com/cirosantilli/linux-kernel-module-cheat/tree/
> e38a1dea9223bf4658384cbd93e748d728de/gem5
>
> - use this kernel config: https://github.com/cirosantilli/linux-kernel-
> module-cheat/blob/e38a1dea9223bf4658384cbd93
> e748d728de/kernel_config_x86_64-gem5
>
>
>
> so maybe this is what you are missing.
>
>
>
> This is the patch I referred to:
>
>
>
> @@ -27,7 +27,7 @@ disks_dir="${system_dir}/disks"
>
>  mkdir -p "$binaries_dir" "$disks_dir"
>
>  cd "${top}/gem5"
>
>  if [ "$arch" = x86_64 ]; then
>
> -  scons -j "$j" --ignore-style build/X86/gem5.opt
>
> +  scons -j "$j" --ignore-style build/X86_MOESI_AMD_Base/gem5.opt
>
>f="${disks_dir}/linux-bigswap2.img"
>
>dd if=/dev/zero of="$f" bs=1024 count=65536
>
>mkswap "$f"
>
> --- a/run
>
> +++ b/run
>
> @@ -134,7 +134,7 @@ if "$gem5"; then
>
>gem5_common="\
>
>  M5_PATH='${gem5_build_dir}/system' \
>
>  ${debug_vm} \
>
> -'${gem5_src_dir}/build/${gem5_arch}/gem5.opt' \
>
> +'${gem5_src_dir}/build/X86_MOESI_AMD_Base/gem5.opt' \
>
>  --debug-file=trace.txt \
>
>  ${gem5opts} \
>
>  -d '${m5out_dir}' \
>
>
>
>
>
> On Wed, Apr 4, 2018 at 9:30 PM, Vitorio Cargnini (lcargnini) <
> lcargn...@micron.com> wrote:
>
> Ok,
>
> Thanks Ciro, I'll look into that, besides that I built a Gentoo image, and
> currently, I'm facing another roadblock, for some reason booting the
> images, on x86 at least I didn’t attempt it on ARM yet, it is next on the
> agenda, once It achieves the following point:
> [0.913616] ata1.01: configured for UDMA/33
> [0.913702] scsi 0:0:0:0: Direct-Access ATA  M5 IDE Disk
> n/a  PQ: 0 ANSI: 5
> [0.914223] sd 0:0:0:0: [sda] 131072000 512-byte logical blocks: (67.1
> GB/62.5 GiB)
> [0.914269] sd 0:0:0:0: [sda] Write Protect is off
> [0.914302] sd 0:0:0:0: [sda] Write cache: disabled, read cache:
> enabled, doesn't support DPO or FUA
> [0.914771] sd 0:0:0:0: Attached scsi generic sg0 type 0
> [0.914862]  sda: sda1
> [0.915256] sd 0:0:0:0: [sda] Attached SCSI disk
> [0.917970] scsi 0:0:1:0: Direct-Access ATA  M5 IDE Disk
> n/a  PQ: 0 ANSI: 5
> [0.918339] sd 0:0:1:0: [sdb] 1048320 512-byte logical blocks: (537
> MB/512 MiB)
> [0.918384] sd 0:0:1:0: [sdb] Write Protect is off
> [0.918417] sd 0:0:1:0: [sdb] Write cache: disabled, read cache:
> enabled, doesn't support DPO or FUA
> [0.918883] sd 0:0:1:0: Attached scsi generic sg1 type 0
> [0.919251] sd 0:0:1:0: [sdb] Attached SCSI disk
>
> It breaks, I got the following error on gem5 console
>
>
> [1226:lcargnini@rndarch11/home/user/gem5]> ./build/X86_MOESI_AMD_Base/gem5.opt
>  configs/user/fs.py --caches --l2cache --smt 
> --disk-image=`pwd`/disks/user-gentoo-gem5.img
> --kernel=`pwd`/binaries/vmlinuX-4.9.76-gentoo-r1-user-gem5
> --mem-type=DDR4_2400_16x4 --mem-size=4GB --mem-ranks=4
> gem5 Simulator System.  http://gem5.org
> gem5 is copyrighted software; use the --copyright option for details.
>
> gem5 compiled Mar 26 2018 18:01:36
> gem5 started Apr  4 2018 13:26:40
> gem5 executin

Re: [gem5-users] [EXT] Re: New image of Ubuntu 17.x with custom kernel (append build string -gem5) - kernel Panic

2018-04-05 Thread Vitorio Cargnini (lcargnini)
Thanks Ciro,

My guess it is the –smt parameter and X86 don’t work well together for some 
reason, I made an attempt using a Hello world and once I removed the –smt 
parameter it worked.

Any taugths anybody ?


From: gem5-users [mailto:gem5-users-boun...@gem5.org] On Behalf Of Ciro Santilli
Sent: Wednesday, April 4, 2018 2:39 PM
To: gem5 users mailing list 
Subject: Re: [gem5-users] [EXT] Re: New image of Ubuntu 17.x with custom kernel 
(append build string -gem5) - kernel Panic

Hi Vitorio,

I don't know exactly what is the problem, but I can provide a setup that just 
works which might help you to diff it out: 
https://github.com/cirosantilli/linux-kernel-module-cheat/tree/e38a1dea9223bf4658384cbd93e748d728de#gem5-getting-started
 (replace arm with x86_64)

My commands use X86/gem.out, but I've have just hacked up the scripts locally 
to use X86_MOESI_AMD_Base like you and it this just worked:

./run -g -m 4G --  --mem-type=DDR4_2400_16x4 --mem-ranks=4 --caches --l2cache 
--smt

Previously I had some similar failures on x86 (not sure exactly the same), and 
they went away when I did the following:

- get latest gem5 master, that test repo is at 68af229 via a submodule: 
https://github.com/cirosantilli/linux-kernel-module-cheat/tree/e38a1dea9223bf4658384cbd93e748d728de/gem5
- use this kernel config: 
https://github.com/cirosantilli/linux-kernel-module-cheat/blob/e38a1dea9223bf4658384cbd93e748d728de/kernel_config_x86_64-gem5

so maybe this is what you are missing.

This is the patch I referred to:

@@ -27,7 +27,7 @@ disks_dir="${system_dir}/disks"
 mkdir -p "$binaries_dir" "$disks_dir"
 cd "${top}/gem5"
 if [ "$arch" = x86_64 ]; then
-  scons -j "$j" --ignore-style build/X86/gem5.opt
+  scons -j "$j" --ignore-style build/X86_MOESI_AMD_Base/gem5.opt
   f="${disks_dir}/linux-bigswap2.img"
   dd if=/dev/zero of="$f" bs=1024 count=65536
   mkswap "$f"
--- a/run
+++ b/run
@@ -134,7 +134,7 @@ if "$gem5"; then
   gem5_common="\
 M5_PATH='${gem5_build_dir}/system' \
 ${debug_vm} \
-'${gem5_src_dir}/build/${gem5_arch}/gem5.opt' \
+'${gem5_src_dir}/build/X86_MOESI_AMD_Base/gem5.opt' \
 --debug-file=trace.txt \
 ${gem5opts} \
 -d '${m5out_dir}' \


On Wed, Apr 4, 2018 at 9:30 PM, Vitorio Cargnini (lcargnini) 
mailto:lcargn...@micron.com>> wrote:
Ok,

Thanks Ciro, I'll look into that, besides that I built a Gentoo image, and 
currently, I'm facing another roadblock, for some reason booting the images, on 
x86 at least I didn’t attempt it on ARM yet, it is next on the agenda, once It 
achieves the following point:
[0.913616] ata1.01: configured for UDMA/33
[0.913702] scsi 0:0:0:0: Direct-Access ATA  M5 IDE Disk  n/a  
PQ: 0 ANSI: 5
[0.914223] sd 0:0:0:0: [sda] 131072000 512-byte logical blocks: (67.1 
GB/62.5 GiB)
[0.914269] sd 0:0:0:0: [sda] Write Protect is off
[0.914302] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, 
doesn't support DPO or FUA
[0.914771] sd 0:0:0:0: Attached scsi generic sg0 type 0
[0.914862]  sda: sda1
[0.915256] sd 0:0:0:0: [sda] Attached SCSI disk
[0.917970] scsi 0:0:1:0: Direct-Access ATA  M5 IDE Disk  n/a  
PQ: 0 ANSI: 5
[0.918339] sd 0:0:1:0: [sdb] 1048320 512-byte logical blocks: (537 MB/512 
MiB)
[0.918384] sd 0:0:1:0: [sdb] Write Protect is off
[0.918417] sd 0:0:1:0: [sdb] Write cache: disabled, read cache: enabled, 
doesn't support DPO or FUA
[0.918883] sd 0:0:1:0: Attached scsi generic sg1 type 0
[0.919251] sd 0:0:1:0: [sdb] Attached SCSI disk

It breaks, I got the following error on gem5 console


[1226:lcargnini@rndarch11/home/user/gem5]> ./build/X86_MOESI_AMD_Base/gem5.opt  
 configs/user/fs.py --caches --l2cache --smt 
--disk-image=`pwd`/disks/user-gentoo-gem5.img 
--kernel=`pwd`/binaries/vmlinuX-4.9.76-gentoo-r1-user-gem5  
--mem-type=DDR4_2400_16x4 --mem-size=4GB --mem-ranks=4
gem5 Simulator System.  http://gem5.org
gem5 is copyrighted software; use the --copyright option for details.

gem5 compiled Mar 26 2018 18:01:36
gem5 started Apr  4 2018 13:26:40
gem5 executing on rndarch11, pid 26274
command line: ./build/X86_MOESI_AMD_Base/gem5.opt configs/user/fs.py --caches 
--l2cache --smt --disk-image=/home/user/gem5/disks/user-gentoo-gem5.img 
--kernel=/home/user/gem5/binaries/vmlinuX-4.9.76-gentoo-r1-user-gem5 
--mem-type=DDR4_2400_16x4 --mem-size=4GB --mem-ranks=4

warn: Physical memory size specified is 4GB which is greater than 3GB.  Twice 
the number of memory controllers would be created.
Global frequency set at 1 ticks per second
warn: DRAM device capacity (65536 Mbytes) does not match the address range 
assigned (4096 Mbytes)
warn: DRAM device capacity (65536 Mbytes) does not match the address range 
assigned (1024 Mbytes)
info: kernel located at: 
/home/user/gem5/binaries/vmlinuX-4.9.76-gentoo-r1-user-gem5
Listening for com_1 connection on port 3456
  0: rtc: Real-time clock set to Sun Jan  1 00:00:00 2012
0: system.remote_gdb: listening for remote gdb o

Re: [gem5-users] Multithread with se.py

2018-04-05 Thread Jason Lowe-Power
Hi Gagan,

You need to set the same Process as the workload parameter on each CPU (and
create the threads). The file configs/learning_gem5/part3/simple_ruby.py (
https://gem5.googlesource.com/public/gem5/+/master/configs/learning_gem5/part3/simple_ruby.py)
shows an example of how to do this.

Jason

On Thu, Apr 5, 2018 at 10:58 AM Singh, G.  wrote:

> Hi,
>
> I am trying run a multithreaded code in se mode but I don’t know how to
> specify the program to run on all the cores rather than just one.
>
>
>
> Please can someone help me with it
>
>
>
> Best,
>
> Gagan
> ___
> 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] Multithread with se.py

2018-04-05 Thread Singh, G.
Hi,
I am trying run a multithreaded code in se mode but I don’t know how to specify 
the program to run on all the cores rather than just one.

Please can someone help me with it

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

Re: [gem5-users] [EXT] Re: New image of Ubuntu 17.x with custom kernel (append build string -gem5) - kernel Panic

2018-04-05 Thread Vitorio Cargnini (lcargnini)
Hi Ciro,
Thanks again,  looking into your session 12.9.2 that it is exactly the error I 
have. However, it boots on my qemu since I installed the image contents using 
qemu.

How did you solved the 12.9.2 issue?
That it is the same issue, I just went forward in my boot flow.

Regards,
Vitorio.

From: gem5-users [mailto:gem5-users-boun...@gem5.org] On Behalf Of Ciro Santilli
Sent: Wednesday, April 4, 2018 2:39 PM
To: gem5 users mailing list 
Subject: Re: [gem5-users] [EXT] Re: New image of Ubuntu 17.x with custom kernel 
(append build string -gem5) - kernel Panic

Hi Vitorio,

I don't know exactly what is the problem, but I can provide a setup that just 
works which might help you to diff it out: 
https://github.com/cirosantilli/linux-kernel-module-cheat/tree/e38a1dea9223bf4658384cbd93e748d728de#gem5-getting-started
 (replace arm with x86_64)

My commands use X86/gem.out, but I've have just hacked up the scripts locally 
to use X86_MOESI_AMD_Base like you and it this just worked:

./run -g -m 4G --  --mem-type=DDR4_2400_16x4 --mem-ranks=4 --caches --l2cache 
--smt

Previously I had some similar failures on x86 (not sure exactly the same), and 
they went away when I did the following:

- get latest gem5 master, that test repo is at 68af229 via a submodule: 
https://github.com/cirosantilli/linux-kernel-module-cheat/tree/e38a1dea9223bf4658384cbd93e748d728de/gem5
- use this kernel config: 
https://github.com/cirosantilli/linux-kernel-module-cheat/blob/e38a1dea9223bf4658384cbd93e748d728de/kernel_config_x86_64-gem5

so maybe this is what you are missing.

This is the patch I referred to:

@@ -27,7 +27,7 @@ disks_dir="${system_dir}/disks"
 mkdir -p "$binaries_dir" "$disks_dir"
 cd "${top}/gem5"
 if [ "$arch" = x86_64 ]; then
-  scons -j "$j" --ignore-style build/X86/gem5.opt
+  scons -j "$j" --ignore-style build/X86_MOESI_AMD_Base/gem5.opt
   f="${disks_dir}/linux-bigswap2.img"
   dd if=/dev/zero of="$f" bs=1024 count=65536
   mkswap "$f"
--- a/run
+++ b/run
@@ -134,7 +134,7 @@ if "$gem5"; then
   gem5_common="\
 M5_PATH='${gem5_build_dir}/system' \
 ${debug_vm} \
-'${gem5_src_dir}/build/${gem5_arch}/gem5.opt' \
+'${gem5_src_dir}/build/X86_MOESI_AMD_Base/gem5.opt' \
 --debug-file=trace.txt \
 ${gem5opts} \
 -d '${m5out_dir}' \


On Wed, Apr 4, 2018 at 9:30 PM, Vitorio Cargnini (lcargnini) 
mailto:lcargn...@micron.com>> wrote:
Ok,

Thanks Ciro, I'll look into that, besides that I built a Gentoo image, and 
currently, I'm facing another roadblock, for some reason booting the images, on 
x86 at least I didn’t attempt it on ARM yet, it is next on the agenda, once It 
achieves the following point:
[0.913616] ata1.01: configured for UDMA/33
[0.913702] scsi 0:0:0:0: Direct-Access ATA  M5 IDE Disk  n/a  
PQ: 0 ANSI: 5
[0.914223] sd 0:0:0:0: [sda] 131072000 512-byte logical blocks: (67.1 
GB/62.5 GiB)
[0.914269] sd 0:0:0:0: [sda] Write Protect is off
[0.914302] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, 
doesn't support DPO or FUA
[0.914771] sd 0:0:0:0: Attached scsi generic sg0 type 0
[0.914862]  sda: sda1
[0.915256] sd 0:0:0:0: [sda] Attached SCSI disk
[0.917970] scsi 0:0:1:0: Direct-Access ATA  M5 IDE Disk  n/a  
PQ: 0 ANSI: 5
[0.918339] sd 0:0:1:0: [sdb] 1048320 512-byte logical blocks: (537 MB/512 
MiB)
[0.918384] sd 0:0:1:0: [sdb] Write Protect is off
[0.918417] sd 0:0:1:0: [sdb] Write cache: disabled, read cache: enabled, 
doesn't support DPO or FUA
[0.918883] sd 0:0:1:0: Attached scsi generic sg1 type 0
[0.919251] sd 0:0:1:0: [sdb] Attached SCSI disk

It breaks, I got the following error on gem5 console


[1226:lcargnini@rndarch11/home/user/gem5]> ./build/X86_MOESI_AMD_Base/gem5.opt  
 configs/user/fs.py --caches --l2cache --smt 
--disk-image=`pwd`/disks/user-gentoo-gem5.img 
--kernel=`pwd`/binaries/vmlinuX-4.9.76-gentoo-r1-user-gem5  
--mem-type=DDR4_2400_16x4 --mem-size=4GB --mem-ranks=4
gem5 Simulator System.  http://gem5.org
gem5 is copyrighted software; use the --copyright option for details.

gem5 compiled Mar 26 2018 18:01:36
gem5 started Apr  4 2018 13:26:40
gem5 executing on rndarch11, pid 26274
command line: ./build/X86_MOESI_AMD_Base/gem5.opt configs/user/fs.py --caches 
--l2cache --smt --disk-image=/home/user/gem5/disks/user-gentoo-gem5.img 
--kernel=/home/user/gem5/binaries/vmlinuX-4.9.76-gentoo-r1-user-gem5 
--mem-type=DDR4_2400_16x4 --mem-size=4GB --mem-ranks=4

warn: Physical memory size specified is 4GB which is greater than 3GB.  Twice 
the number of memory controllers would be created.
Global frequency set at 1 ticks per second
warn: DRAM device capacity (65536 Mbytes) does not match the address range 
assigned (4096 Mbytes)
warn: DRAM device capacity (65536 Mbytes) does not match the address range 
assigned (1024 Mbytes)
info: kernel located at: 
/home/user/gem5/binaries/vmlinuX-4.9.76-gentoo-r1-user-gem5
Listening for com_1 connection on port 3456
  0: rtc: Real-time cl

[gem5-users] Garnet global network view

2018-04-05 Thread Adil Layach
Dear,


I am trying to implement a routing algorithm that operates in an SDNoC 
architecture and hence, I am trying to bring within a router the information 
concerning all the others routers in order to operate the routing algorithm by 
using a global view of the network (as it could be in a real SDN approach). 
However, I have some difficulties, could you give any hint?


Yours faithfully,


Adil Layach

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

Re: [gem5-users] Multicore x86 simulation hangs during system booting

2018-04-05 Thread Ciro Santilli
My setup https://github.com/cirosantilli/linux-kernel-module-cheat/tree/
32920fd25d6473934a89c48c56f4e12d03abde85#gem5-getting-started correctly
boots x86_64 with 4 cores (./run -c 4), and `cat /proc/cpuinfo` shows them.

I haven't however used your exact same build / run options: RUBY=True
PROTOCOL=MOESI_hammer --ruby

If you run out of options, use my setup as a working base, and bisect the
cause of the problem further.



On Thu, Apr 5, 2018 at 4:13 AM, Xin Zhan  wrote:

> Hi all,
>
> When I simulate a 4-core x86 system, my simulation always hangs during
> system booting. And I tried to use hack_back_ckpt.rcS to create a
> checkpoint but it doesn't work as well. The booting hangs at the step:
>
> Fake M5 x86_64 CPU stepping 01
> Brought up 4 CPUs
>
> I use the below command to build the system
> scons FULL_SYSTEM=1 build/X86/gem5.opt RUBY=True PROTOCOL=MOESI_hammer -j 4
>
> The kernel I am using is x86_64-vmlinux-2.6.22.9.smp. And I use the run
> command:
> build/X86/gem5.opt -d m5out/cpt_general configs/example/fs.py --ruby -n 4
> --script=configs/boot/hack_back_ckpt.rcS
>
> Appreciate if anyone could shed some light!!
>
> Regards,
> Xin
>
> ___
> 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] gem5 crash with some cpu related error in real simulation after restore from a checkpoint

2018-04-05 Thread Ciro Santilli
Both KVM and DerivO3CPU without restore were broken for me without
checkpoints when I last tried them:

- https://github.com/gem5/gem5/issues/16
- https://www.mail-archive.com/gem5-users@gem5.org/msg15048.html


On Thu, Apr 5, 2018 at 4:12 AM, Da Zhang  wrote:

> Hey guys,
>
> My gem5 real simulation crashed with
> "
>
> gem5.opt: build_alter/build/X86/cpu/timebuf.hh:54: void
> TimeBuffer::valid(int) const [with T = DefaultIEWDefaultCommit]:
> Assertion `idx >= -past && idx <= future' failed.
> "
> I am using DerivO3CPU and 32MB l2 cache 32GB mem and ramulator memory.
> Restore a checkpoint who was token using KVM CPU. The workload was running
> 8 instances of the same application with 2 threads each.
> More backtrace
> "
>
> 172928 --- BEGIN LIBC BACKTRACE ---
>
> 172929 build_alter/build/X86/gem5.opt(_Z15print_backtracev+0x15)
> [0x1558a15]
>
> 172930 build_alter/build/X86/gem5.opt(_Z12abortHandleri+0x39)[0x156b039]
>
> 172931 /lib64/libpthread.so.0(+0xf100)[0x7f538bf88100]
>
> 172932 /lib64/libc.so.6(gsignal+0x37)[0x7f538a5405f7]
>
> 172933 /lib64/libc.so.6(abort+0x148)[0x7f538a541ce8]
>
> 172934 /lib64/libc.so.6(+0x2e566)[0x7f538a539566]
>
> 172935 /lib64/libc.so.6(+0x2e612)[0x7f538a539612]
>
> 172936 build_alter/build/X86/gem5.opt[0x906252]
>
> 172937 build_alter/build/X86/gem5.opt(_ZN10DefaultIEWI9O3CPUImplE12in
> stToCommitER14RefCountingPtrI13BaseO3DynInstIS0_EE+0x1dd)[0x150c09d]
>
> 172938 build_alter/build/X86/gem5.opt(_ZN10DefaultIEWI9O3CPUImplE12ex
> ecuteInstsEv+0x560)[0x150ef40]
>
> 172939 build_alter/build/X86/gem5.opt(_ZN10DefaultIEWI9O3CPUImplE4tic
> kEv+0x11e)[0x1513a9e]
>
> 172940 build_alter/build/X86/gem5.opt(_ZN9FullO3CPUI9O3CPUImplE4tickE
> v+0x12b)[0x14e5a8b]
>
> 172941 build_alter/build/X86/gem5.opt(_ZN10EventQueue10serviceOneEv+
> 0xc5)[0x155f265]
>
> 172942 build_alter/build/X86/gem5.opt(_Z9doSimLoopP10EventQueue+
> 0x40)[0x1576580]
>
> 172943 build_alter/build/X86/gem5.opt(_Z8simulatem+0xd4d)[0x157768d]
>
> 172944 build_alter/build/X86/gem5.opt[0xe9a07a]
>
> 172945 build_alter/build/X86/gem5.opt[0xb84bc7]
>
> 172946 /lib64/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x50c2)[
> 0x7f538b88d5d2]
>
> 172947 /lib64/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7ed)[0x7f538b88e0bd]
>
> 172948 /lib64/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x425f)[
> 0x7f538b88c76f]
>
> 172949 /lib64/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7ed)[0x7f538b88e0bd]
>
> 172950 /lib64/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x425f)[
> 0x7f538b88c76f]
>
> 172951 /lib64/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7ed)[0x7f538b88e0bd]
>
> 172952 /lib64/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x425f)[
> 0x7f538b88c76f]
>
> 172953 /lib64/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7ed)[0x7f538b88e0bd]
>
> 172954 /lib64/libpython2.7.so.1.0(PyEval_EvalCode+0x32)[0x7f538b88e1c2]
>
> 172955 /lib64/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x4f00)[
> 0x7f538b88d410]
>
> 172956 /lib64/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7ed)[0x7f538b88e0bd]
>
> 172957 /lib64/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x425f)[
> 0x7f538b88c76f]
>
> 172958 /lib64/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7ed)[0x7f538b88e0bd]
>
> 172959 /lib64/libpython2.7.so.1.0(PyEval_EvalCode+0x32)[0x7f538b88e1c2]
>
> 172960 /lib64/libpython2.7.so.1.0(+0xfb5ff)[0x7f538b8a75ff]
>
> 172961 --- END LIBC BACKTRACE ---
> "
> any idea? this only happen during real simulation, and sometimes we can
> avoid it by running longer warmup in atomic mode.
>
> best,
> Da Zhang
>
> ___
> 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