[gem5-users] Re: Full System Simulation on ARM system takes too long

2023-12-25 Thread saras nanda via gem5-users
The solution worked thank you so much for the suggestion .

Regards
Saras

On Wed, Dec 6, 2023 at 4:35 PM Kaustav Goswami via gem5-users <
gem5-users@gem5.org> wrote:

> Hi Saras,
>
> You’re booting up the disk image with timing cores and the disk’s init
> command is to load /sbin/init. It is expected that it’ll take 10ish hours
> to boot Ubuntu in this case. /sbin/init starts the default services for
> Ubuntu via systemd (
> [0.314602] systemd[1]: System time before build time, advancing
> clock.). This takes a lot of time.
>
> If you want to load the disk image faster then boot the disk image using
> kvm or atomic cpu and then on the first m5 exit switch to timing cores.
> Alternatively you can pass init=/bin/bash or something to the kernel which
> will skip systemd (although it’ll mean that you’ll only load the kernel,
> and none of the Ubuntu services).
>
> Thanks,
> Kaustav.
>
>
> On Wed, Dec 6, 2023 at 1:09 PM saras nanda via gem5-users <
> gem5-users@gem5.org> wrote:
>
>> Hello Everyone,
>>
>> I am doing a Full System simulation on ARM , I edited my image on qemu
>> and installed all necessary files
>>
>> After that, I started the Gem5 FS using the following command,
>>
>> ./build/ARM/gem5.opt configs/example/arm/fs_power.py
>> --kernel=/home/saras/gem5-resources/src/arm-ubuntu/gem5/full_system_images/binaries/vmlinux.arm64
>> --disk=/home/saras/gem5-resources/src/arm-ubuntu/gem5/full_system_images/disks/arm64-ubuntu-server.img
>> --caches
>> The image gets booted up but takes a very long time to complete the
>> process and I haven't reached the login part yet, but the whole thing takes
>> about 7-8 hours to run halfway through.
>>
>> The m5term output is as follows.
>>
>>  m5 terminal: Terminal 0 
>> [0.00] Booting Linux on physical CPU 0x00 [0x410fd070]
>> [0.00] Linux version 4.18.0+ (arm-employee@arm-computer) (gcc
>> version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1)) #1 SMP PREEMPT Wed
>> Nov 6 14:10:00 GMT 2019
>> [0.00] Machine model: V2P-CA15
>> [0.00] earlycon: pl11 at MMIO 0x1c09 (options '')
>> [0.00] bootconsole [pl11] enabled
>> [0.00] Memory limited to 2048MB
>> [0.00] cma: Reserved 16 MiB at 0xff00
>> [0.00] On node 0 totalpages: 524288
>> [0.00]   DMA32 zone: 8192 pages used for memmap
>> [0.00]   DMA32 zone: 0 pages reserved
>> [0.00]   DMA32 zone: 524288 pages, LIFO batch:31
>> [0.00] random: get_random_bytes called from
>> start_kernel+0xa8/0x3e8 with crng_init=0
>> [0.00] percpu: Embedded 23 pages/cpu @(ptrval) s53976
>> r8192 d32040 u94208
>> [0.00] pcpu-alloc: s53976 r8192 d32040 u94208 alloc=23*4096
>> [0.00] pcpu-alloc: [0] 0 [0] 1
>> [0.00] Detected PIPT I-cache on CPU0
>> [0.00] CPU features: enabling workaround for ARM erratum 832075
>> [0.00] CPU features: enabling workaround for ARM erratum 834220
>> [0.00] CPU features: enabling workaround for EL2 vector hardening
>> [0.00] CPU features: detected: Kernel page table isolation (KPTI)
>> [0.00] Built 1 zonelists, mobility grouping on.  Total pages:
>> 516096
>> [0.00] Kernel command line: earlyprintk earlycon=pl011,0x1c09
>> console=ttyAMA0 lpj=19988480 norandmaps loglevel=8 mem=2GB root=/dev/vda1
>> rw init=/sbin/init vmalloc=768MB
>> [0.00] Dentry cache hash table entries: 262144 (order: 9, 2097152
>> bytes)
>> [0.00] Inode-cache hash table entries: 131072 (order: 8, 1048576
>> bytes)
>> [0.00] Memory: 2034232K/2097152K available (6910K kernel code,
>> 452K rwdata, 2312K rodata, 448K init, 217K bss, 46536K reserved, 16384K
>> cma-reserved)
>> [0.00] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
>> [0.00] Preemptible hierarchical RCU implementation.
>> [0.00] RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=2.
>> [0.00] Tasks RCU enabled.
>> [0.00] RCU: Adjusting geometry for rcu_fanout_leaf=16,
>> nr_cpu_ids=2
>> [0.00] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
>> [0.00] GIC: GICv2 detected, but range too small and
>> irqchip.gicv2_force_probe not set
>> [0.00] clk_gem5_energy_ctrl: No cpu-map in DT! Falling back to
>> old detection method!
>> [0.00] clk_gem5_energy_ctrl: No clusters in DT! Falling back to
>> using CPU topology!
>> [0.02] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps
>> every 89478484971ns
>> [0.000164] arch_timer: cp15 and mmio timer(s) running at 25.16MHz
>> (phys/virt).
>> [0.000230] clocksource: arch_sys_counter: mask: 0xff
>> max_cycles: 0x5cdd39714, max_idle_ns: 440795202620 ns
>> [0.000325] sched_clock: 56 bits at 25MHz, resolution 39ns, wraps
>> every 4398046511084ns
>> [0.000441] Console: colour dummy device 80x25
>> [0.000486] Calibrating delay loop (skipped) preset value.. 9994.24
>> BogoMIPS 

[gem5-users] Re: Full System Simulation on ARM system takes too long

2023-12-25 Thread saras nanda via gem5-users
The solution worked, thank you so much for the suggestion.

Regards
Saras

On Fri, Dec 22, 2023 at 1:46 PM saras nanda  wrote:

> i tried booting it with Fs.py and I am unable to login once the system
> boots ,I don't know what Is the problem .
>
> These are the steps I followed while creating the image on qemu
>
> Install the dependecies
>
> sudo apt install qemu-system-arm qemu-system-mips qemu-efi-aarch64
> qemu-kvm qemu-efi cloud-image-utils
>
>
> Prepare the EFI partition
>
> dd if=/dev/zero of=flash0.img bs=1M count=64
>
> dd if=/usr/share/qemu-efi/QEMU_EFI.fd of=flash0.img conv=notrunc
>
> dd if=/dev/zero of=flash1.img bs=1M count=64
>
> credentials for the user
>
> cat >user-data <
> #cloud-config
>
> password: thepassword
>
> chpasswd: { expire: False }
>
> ssh_pwauth: True
>
> EOF
>
> cloud-localds user-data.img user-data
>
> then i booted this image on gem5
> the below is the log from m5 terminal
> please let me know if i can rectify this login methodology  so that i can
> check point the system
>  m5 terminal: Terminal 0 
> [0.00] Booting Linux on physical CPU 0x00 [0x410fd070]
> [0.00] Linux version 4.18.0+ (arm-employee@arm-computer) (gcc
> version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1)) #1 SMP PREEMPT Wed
> Nov 6 14:10:00 GMT 2019
> [0.00] Machine model: V2P-CA15
> [0.00] Memory limited to 512MB
> [0.00] cma: Reserved 16 MiB at 0x9f00
> [0.00] On node 0 totalpages: 131072
> [0.00]   DMA32 zone: 2048 pages used for memmap
> [0.00]   DMA32 zone: 0 pages reserved
> [0.00]   DMA32 zone: 131072 pages, LIFO batch:31
> [0.00] random: get_random_bytes called from
> start_kernel+0xa8/0x3e8 with crng_init=0
> [0.00] percpu: Embedded 23 pages/cpu @(ptrval) s53976
> r8192 d32040 u94208
> [0.00] pcpu-alloc: s53976 r8192 d32040 u94208 alloc=23*4096
> [0.00] pcpu-alloc: [0] 0
> [0.00] Detected PIPT I-cache on CPU0
> [0.00] CPU features: enabling workaround for ARM erratum 832075
> [0.00] CPU features: enabling workaround for ARM erratum 834220
> [0.00] CPU features: enabling workaround for EL2 vector hardening
> [0.00] CPU features: detected: Kernel page table isolation (KPTI)
> [0.00] Built 1 zonelists, mobility grouping on.  Total pages:
> 129024
> [0.00] Kernel command line: earlyprintk=pl011,0x1c09
> console=ttyAMA0 lpj=19988480 norandmaps rw loglevel=8 mem=512MB
> root=/dev/sda1
> [0.00] Dentry cache hash table entries: 65536 (order: 7, 524288
> bytes)
> [0.00] Inode-cache hash table entries: 32768 (order: 6, 262144
> bytes)
> [0.00] Memory: 480148K/524288K available (6910K kernel code, 452K
> rwdata, 2312K rodata, 448K init, 217K bss, 27756K reserved, 16384K
> cma-reserved)
> [0.00] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
> [0.00] Preemptible hierarchical RCU implementation.
> [0.00] RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=1.
> [0.00] Tasks RCU enabled.
> [0.00] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
> [0.00] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
> [0.00] GIC: GICv2 detected, but range too small and
> irqchip.gicv2_force_probe not set
> [0.00] clk_gem5_energy_ctrl: No cpu-map in DT! Falling back to old
> detection method!
> [0.00] clk_gem5_energy_ctrl: No clusters in DT! Falling back to
> using CPU topology!
> [0.01] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every
> 89478484971ns
> [0.82] arch_timer: Unable to find a suitable frame in timer @
> 0x2a81
> [0.85] Failed to initialize '/timer@2a81': -22
> [0.000136] Console: colour dummy device 80x25
> [0.000140] Calibrating delay loop (skipped) preset value.. 9994.24
> BogoMIPS (lpj=19988480)
> [0.000145] pid_max: default: 32768 minimum: 301
> [0.000179] Mount-cache hash table entries: 1024 (order: 1, 8192 bytes)
> [0.000183] Mountpoint-cache hash table entries: 1024 (order: 1, 8192
> bytes)
> [0.024069] ASID allocator initialised with 128 entries
> [0.032070] Hierarchical SRCU implementation.
> [0.048080] smp: Bringing up secondary CPUs ...
> [0.048084] smp: Brought up 1 node, 1 CPU
> [0.048087] SMP: Total of 1 processors activated.
> [0.048090] CPU features: detected: Privileged Access Never
> [0.048093] CPU features: detected: User Access Override
> [0.048096] CPU features: detected: 32-bit EL0 Support
> [0.048099] CPU features: detected: Scalable Vector Extension
> [0.048428] SVE: maximum available vector length 16 bytes per vector
> [0.048431] SVE: default vector length 16 bytes per vector
> [0.048434] CPU: All CPU(s) started at EL2
> [0.048438] alternatives: patching kernel code
> [0.049061] devtmpfs: initialized
> [0.049818] clocksource: jiffies: mask: 

[gem5-users] Re: Full System Simulation on ARM system takes too long

2023-12-22 Thread saras nanda via gem5-users
Hello ,

I also tried skipping systemd and passed init=/bin/bash or something to the
kernel which will skip systemd, however after booting I am not getting
proper environment to run the packages , some packages are detected by
ubuntu some are said to be missing while everything works fine on qemu ,
how can run the modules properly even without needing systemd , I am
attaching the m5 terminal below(after skipping systemd) , and the messages
I am getting when I try to run something ,

why do I keep getting [0.765103] random: command-not-fou: uninitialized
urandom read (24 bytes read)

 m5 terminal: Terminal 0 
[0.00] Booting Linux on physical CPU 0x00 [0x410fd070]
[0.00] Linux version 4.18.0+ (arm-employee@arm-computer) (gcc
version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1)) #1 SMP PREEMPT Wed
Nov 6 14:10:00 GMT 2019
[0.00] Machine model: V2P-CA15
[0.00] earlycon: pl11 at MMIO 0x1c09 (options '')
[0.00] bootconsole [pl11] enabled
[0.00] Memory limited to 2048MB
[0.00] cma: Reserved 16 MiB at 0xff00
[0.00] On node 0 totalpages: 524288
[0.00]   DMA32 zone: 8192 pages used for memmap
[0.00]   DMA32 zone: 0 pages reserved
[0.00]   DMA32 zone: 524288 pages, LIFO batch:31
[0.00] random: get_random_bytes called from start_kernel+0xa8/0x3e8
with crng_init=0
[0.00] percpu: Embedded 23 pages/cpu @(ptrval) s53976 r8192
d32040 u94208
[0.00] pcpu-alloc: s53976 r8192 d32040 u94208 alloc=23*4096
[0.00] pcpu-alloc: [0] 0 [0] 1
[0.00] Detected PIPT I-cache on CPU0
[0.00] CPU features: enabling workaround for ARM erratum 832075
[0.00] CPU features: enabling workaround for ARM erratum 834220
[0.00] CPU features: enabling workaround for EL2 vector hardening
[0.00] CPU features: detected: Kernel page table isolation (KPTI)
[0.00] Built 1 zonelists, mobility grouping on.  Total pages: 516096
[0.00] Kernel command line: earlyprintk earlycon=pl011,0x1c09
console=ttyAMA0 lpj=19988480 norandmaps loglevel=8 mem=2GB root=/dev/vda1
rw init=/bin/bash vmalloc=768MB
[0.00] Dentry cache hash table entries: 262144 (order: 9, 2097152
bytes)
[0.00] Inode-cache hash table entries: 131072 (order: 8, 1048576
bytes)
[0.00] Memory: 2034232K/2097152K available (6910K kernel code, 452K
rwdata, 2312K rodata, 448K init, 217K bss, 46536K reserved, 16384K
cma-reserved)
[0.00] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[0.00] Preemptible hierarchical RCU implementation.
[0.00] RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=2.
[0.00] Tasks RCU enabled.
[0.00] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[0.00] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[0.00] GIC: GICv2 detected, but range too small and
irqchip.gicv2_force_probe not set
[0.00] clk_gem5_energy_ctrl: No cpu-map in DT! Falling back to old
detection method!
[0.00] clk_gem5_energy_ctrl: No clusters in DT! Falling back to
using CPU topology!
[0.02] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every
89478484971ns
[0.000164] arch_timer: cp15 and mmio timer(s) running at 25.16MHz
(phys/virt).
[0.000230] clocksource: arch_sys_counter: mask: 0xff
max_cycles: 0x5cdd39714, max_idle_ns: 440795202620 ns
[0.000325] sched_clock: 56 bits at 25MHz, resolution 39ns, wraps every
4398046511084ns
[0.000440] Console: colour dummy device 80x25
[0.000485] Calibrating delay loop (skipped) preset value.. 9994.24
BogoMIPS (lpj=19988480)
[0.000560] pid_max: default: 32768 minimum: 301
[0.000635] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
[0.000698] Mountpoint-cache hash table entries: 4096 (order: 3, 32768
bytes)
[0.024160] ASID allocator initialised with 128 entries
[0.032159] Hierarchical SRCU implementation.
[0.048175] smp: Bringing up secondary CPUs ...
[0.080241] Detected PIPT I-cache on CPU1
[0.080297] CPU1: Booted secondary processor 0x000101 [0x410fd070]
[0.080413] smp: Brought up 1 node, 2 CPUs
[0.080541] SMP: Total of 2 processors activated.
[0.080584] CPU features: detected: Privileged Access Never
[0.080634] CPU features: detected: User Access Override
[0.080681] CPU features: detected: 32-bit EL0 Support
[0.080727] CPU features: detected: Scalable Vector Extension
[0.083408] SVE: maximum available vector length 16 bytes per vector
[0.083465] SVE: default vector length 16 bytes per vector
[0.083514] CPU: All CPU(s) started at EL2
[0.083557] alternatives: patching kernel code
[0.084375] devtmpfs: initialized
[0.085275] clocksource: jiffies: mask: 0x max_cycles:
0x, max_idle_ns: 764504178510 ns
[0.085362] futex hash table entries: 512 (order: 3, 32768 bytes)
[

[gem5-users] Re: Full System Simulation on ARM system takes too long

2023-12-22 Thread saras nanda via gem5-users
i tried booting it with Fs.py and I am unable to login once the system
boots ,I don't know what Is the problem .

These are the steps I followed while creating the image on qemu

Install the dependecies

sudo apt install qemu-system-arm qemu-system-mips qemu-efi-aarch64 qemu-kvm
qemu-efi cloud-image-utils


Prepare the EFI partition

dd if=/dev/zero of=flash0.img bs=1M count=64

dd if=/usr/share/qemu-efi/QEMU_EFI.fd of=flash0.img conv=notrunc

dd if=/dev/zero of=flash1.img bs=1M count=64

credentials for the user

cat >user-data <
[0.148290] PTP clock support registered
[0.152247] NET: Registered protocol family 2
[0.152403] tcp_listen_portaddr_hash hash table entries: 256 (order: 0,
4096 bytes)
[0.152412] TCP established hash table entries: 4096 (order: 3, 32768
bytes)
[0.152439] TCP bind hash table entries: 4096 (order: 4, 65536 bytes)
[0.152467] TCP: Hash tables configured (established 4096 bind 4096)
[0.152484] UDP hash table entries: 256 (order: 1, 8192 bytes)
[0.152493] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[0.152529] NET: Registered protocol family 1
[0.164309] RPC: Registered named UNIX socket transport module.
[0.164313] RPC: Registered udp transport module.
[0.164318] RPC: Registered tcp transport module.
[0.164322] RPC: Registered tcp NFSv4.1 backchannel transport module.
[0.164328] PCI: CLS 0 bytes, default 64
[0.164507] kvm [1]: SVE system without VHE unsupported.  Broken cpu?
[0.164866] workingset: timestamp_bits=62 max_order=17 bucket_order=0
[0.167257] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[0.169692] fuse init (API version 7.27)
[0.170180] io scheduler noop registered
[0.170253] io scheduler cfq registered (default)
[0.170258] io scheduler mq-deadline registered
[0.170263] io scheduler kyber registered
[0.170292] atomic64_test: passed
[0.170659] pci-host-generic 3000.pci: host bridge /pci ranges:
[0.170666] pci-host-generic 3000.pci:   No bus range found for
/pci, using [bus 00-ff]
[0.170673] pci-host-generic 3000.pci: Parsing ranges property...
[0.170682] pci-host-generic 3000.pci:IO 0x2f00..0x2f00
-> 0x
[0.170692] pci-host-generic 3000.pci:   MEM 0x4000..0x7fff
-> 0x
[0.170711] pci-host-generic 3000.pci: ECAM at [mem
0x3000-0x3fff] for [bus 00-ff]
[0.170771] pci-host-generic 3000.pci: PCI host bridge to bus :00
[0.170778] pci_bus :00: root bus resource [bus 00-ff]
[0.170785] pci_bus :00: root bus resource [io  0x-0x]
[0.170792] pci_bus :00: root bus resource [mem
0x4000-0x7fff] (bus address [0x-0x3fff])
[0.170799] pci_bus :00: scanning bus
[0.170816] pci :00:01.0: [8086:7111] type 00 class 0x010185
[0.170825] pci :00:01.0: reg 0x10: [io  0x-0x0007]
[0.170833] pci :00:01.0: reg 0x14: [io  0x-0x0003]
[0.170840] pci :00:01.0: reg 0x18: [io  0x-0x0007]
[0.170847] pci :00:01.0: reg 0x1c: [io  0x-0x0003]
[0.170855] pci :00:01.0: reg 0x20: [io  0x-0x000f]
[0.170863] pci :00:01.0: reg 0x30: [mem 0x4000-0x47ff pref]
[0.171146] pci_bus :00: fixups for bus
[0.171151] pci_bus :00: bus scan returning with max=00
[0.171159] pci :00:01.0: BAR 6: assigned [mem 0x4000-0x47ff
pref]
[0.171166] pci :00:01.0: BAR 4: assigned [io  0x1000-0x100f]
[0.171174] pci :00:01.0: BAR 0: assigned [io  0x1010-0x1017]
[0.171181] pci :00:01.0: BAR 2: assigned [io  0x1018-0x101f]
[0.171188] pci :00:01.0: BAR 1: assigned [io  0x1020-0x1023]
[0.171196] pci :00:01.0: BAR 3: assigned [io  0x1024-0x1027]
[0.172806] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[0.180408] ata_piix :00:01.0: assign IRQ: got 23
[0.180414] ata_piix :00:01.0: version 2.13
[0.180421] ata_piix :00:01.0: enabling device ( -> 0001)
[0.180442] ata_piix :00:01.0: enabling bus mastering
[0.184163] scsi host0: ata_piix
[0.188164] scsi host1: ata_piix
[0.188219] ata1: PATA max UDMA/33 cmd 0x1010 ctl 0x1020 bmdma 0x1000
irq 23
[0.188225] ata2: PATA max UDMA/33 cmd 0x1018 ctl 0x1024 bmdma 0x1008
irq 23
[0.188409] libphy: Fixed MDIO Bus: probed
[0.188425] e1000: Intel(R) PRO/1000 Network Driver - version
7.3.21-k8-NAPI
[0.188430] e1000: Copyright (c) 1999-2006 Intel Corporation.
[0.188450] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[0.188455] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[0.188475] igb: Intel(R) Gigabit Ethernet Network Driver - version
5.4.0-k
[0.188480] igb: Copyright (c) 2007-2014 Intel Corporation.
[0.188500] ixgbe: Intel(R) 10 Gigabit PCI Express Network Driver -
version 5.1.0-k
[0.188505] ixgbe: Copyright (c) 1999-2016 Intel Corporation.
[0.192184] ixgbevf: Intel(R) 10 Gigabit PCI 

[gem5-users] Re: Full System Simulation on ARM system takes too long

2023-12-17 Thread muke101 via gem5-users
Use a different script to take the checkpoint like configs/example/fs.py, which 
does allow atomic cpu, then use the fs_power script to restore the checkpoint 
with the timing cpu.

Sent from Proton Mail mobile

 Original Message 
On 17 Dec 2023, 15:11, saras nanda via gem5-users wrote:

> Hi , I tried this method , used gem5.fast it is still taking the same amount 
> of time , I tried running it with atomic CPU it doesn't allow me to do so . i 
> get the below error ,
> warn: The `get_runtime_isa` function is deprecated. Please migrate away from 
> using this function.
> fatal: The power example script requires 'timing' CPUs.
>
> is there any other work around?
>
> Regards
> Srinija
>
> On Sat, Dec 16, 2023 at 7:12 PM muke101  wrote:
>
>> Run with '--cpu-type=atomic' and then use the m5 command to create a 
>> checkpoint from the terminal which can be restored with the timing CPU. It 
>> should take around 10-20 minutes to get to login with atomic. If able, build 
>> and use gem5.fast too.
>>
>> Sent from Proton Mail mobile
>>
>>  Original Message 
>> On 17 Dec 2023, 00:05, saras nanda via gem5-users < gem5-users@gem5.org> 
>> wrote:
>>
>>> Hello Everyone,
>>>
>>> I am doing a Full System simulation on ARM , I edited my image on qemu and 
>>> installed all necessary files
>>>
>>> After that, I started the Gem5 FS using the following command,
>>>
>>> ./build/ARM/gem5.opt configs/example/arm/fs_power.py 
>>> --kernel=/home/saras/gem5-resources/src/arm-ubuntu/gem5/full_system_images/binaries/vmlinux.arm64
>>>  
>>> --disk=/home/saras/gem5-resources/src/arm-ubuntu/gem5/full_system_images/disks/arm64-ubuntu-server.img
>>>  --caches
>>> The image gets booted up but takes a very long time to complete the process 
>>> and I haven't reached the login part yet, but the whole thing takes about 
>>> 7-8 hours to run halfway through.
>>>
>>> The m5term output is as follows.
>>>  m5 terminal: Terminal 0 
>>> [ 0.00] Booting Linux on physical CPU 0x00 [0x410fd070]
>>> [ 0.00] Linux version 4.18.0+ (arm-employee@arm-computer) (gcc version 
>>> 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1)) #1 SMP PREEMPT Wed Nov 6 
>>> 14:10:00 GMT 2019
>>> [ 0.00] Machine model: V2P-CA15
>>> [ 0.00] earlycon: pl11 at MMIO 0x1c09 (options '')
>>> [ 0.00] bootconsole [pl11] enabled
>>> [ 0.00] Memory limited to 2048MB
>>> [ 0.00] cma: Reserved 16 MiB at 0xff00
>>> [ 0.00] On node 0 totalpages: 524288
>>> [ 0.00] DMA32 zone: 8192 pages used for memmap
>>> [ 0.00] DMA32 zone: 0 pages reserved
>>> [ 0.00] DMA32 zone: 524288 pages, LIFO batch:31
>>> [ 0.00] random: get_random_bytes called from start_kernel+0xa8/0x3e8 
>>> with crng_init=0
>>> [ 0.00] percpu: Embedded 23 pages/cpu @(ptrval) s53976 r8192 
>>> d32040 u94208
>>> [ 0.00] pcpu-alloc: s53976 r8192 d32040 u94208 alloc=23*4096
>>> [ 0.00] pcpu-alloc: [0] 0 [0] 1
>>> [ 0.00] Detected PIPT I-cache on CPU0
>>> [ 0.00] CPU features: enabling workaround for ARM erratum 832075
>>> [ 0.00] CPU features: enabling workaround for ARM erratum 834220
>>> [ 0.00] CPU features: enabling workaround for EL2 vector hardening
>>> [ 0.00] CPU features: detected: Kernel page table isolation (KPTI)
>>> [ 0.00] Built 1 zonelists, mobility grouping on. Total pages: 516096
>>> [ 0.00] Kernel command line: earlyprintk earlycon=pl011,0x1c09 
>>> console=ttyAMA0 lpj=19988480 norandmaps loglevel=8 mem=2GB root=/dev/vda1 
>>> rw init=/sbin/init vmalloc=768MB
>>> [ 0.00] Dentry cache hash table entries: 262144 (order: 9, 2097152 
>>> bytes)
>>> [ 0.00] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
>>> [ 0.00] Memory: 2034232K/2097152K available (6910K kernel code, 452K 
>>> rwdata, 2312K rodata, 448K init, 217K bss, 46536K reserved, 16384K 
>>> cma-reserved)
>>> [ 0.00] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
>>> [ 0.00] Preemptible hierarchical RCU implementation.
>>> [ 0.00] RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=2.
>>> [ 0.00] Tasks RCU enabled.
>>> [ 0.00] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
>>> [ 0.00] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
>>> [ 0.00] GIC: GICv2 detected, but range too small and 
>>> irqchip.gicv2_force_probe not set
>>> [ 0.00] clk_gem5_energy_ctrl: No cpu-map in DT! Falling back to old 
>>> detection method!
>>> [ 0.00] clk_gem5_energy_ctrl: No clusters in DT! Falling back to using 
>>> CPU topology!
>>> [ 0.02] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 
>>> 89478484971ns
>>> [ 0.000164] arch_timer: cp15 and mmio timer(s) running at 25.16MHz 
>>> (phys/virt).
>>> [ 0.000230] clocksource: arch_sys_counter: mask: 0xff 
>>> max_cycles: 0x5cdd39714, max_idle_ns: 440795202620 ns
>>> [ 0.000325] sched_clock: 56 bits at 25MHz, resolution 39ns, wraps every 
>>> 

[gem5-users] Re: Full System Simulation on ARM system takes too long

2023-12-17 Thread saras nanda via gem5-users
Hi , Thanks for the suggestion , but my ultimate aim is to run ubuntu 20 ,
because the packages I would like to run as benchmarks require ubuntu 20 ,
so I just made. a trail with full fledged ubuntu 18 distribution, the light
ones I tried from this link
https://www.gem5.org/documentation/general_docs/fullsystem/guest_binaries are
not getting simulated on qemu , as they exit ,upon that it does not  have
ubuntu 20 distribution .can you please suggest me what can be done on this ?

Regards
saras

On Sun, Dec 17, 2023 at 5:45 AM Giacomo Travaglini <
giacomo.travagl...@arm.com> wrote:

> Hi saras,
>
>
>
> You are using a fully-fledged ubuntu distribution. May I suggest you a
> more lightweight solution?
>
>
>
> Please have a look at the ubuntu18.04 option in
> https://www.gem5.org/documentation/general_docs/fullsystem/guest_binaries
>
>
>
> Kind Regards
>
>
>
> Giacomo
>
>
>
> *From: *saras nanda via gem5-users 
> *Date: *Friday, 15 December 2023 at 23:48
> *To: *The gem5 Users mailing list 
> *Cc: *Kaustav Goswami , muke...@protonmail.com <
> muke...@protonmail.com>, saras nanda 
> *Subject: *[gem5-users] Re: Full System Simulation on ARM system takes
> too long
>
> Even after hours of booting even 2-3 days consecutively my image wouldn't
> reach the login prompt to make the checkpointing it would reach
> [  OK  ] Started Create Volatile Files and Directories.
>  Starting Update UTMP about System Boot/Shutdown...
>  Starting Network Time Synchronization...
> [  OK  ] Started Update UTMP about System Boot/Shutdown.
> [  OK  ] Started Network Time Synchronization.
> [  OK  ] Reached target System Time Synchronized.
>
> and then stay at this point forever and I cant even get the login prompt
> to do checkpointing etc etc
>
> please let me know what can I do about this issue .
>
> regards
>
> saras
>
>
>
> On Wed, Dec 6, 2023 at 4:35 PM Kaustav Goswami via gem5-users <
> gem5-users@gem5.org> wrote:
>
> Hi Saras,
>
>
>
> You’re booting up the disk image with timing cores and the disk’s init
> command is to load /sbin/init. It is expected that it’ll take 10ish hours
> to boot Ubuntu in this case. /sbin/init starts the default services for
> Ubuntu via systemd (
>
> [0.314602] systemd[1]: System time before build time, advancing
> clock.). This takes a lot of time.
>
>
>
> If you want to load the disk image faster then boot the disk image using
> kvm or atomic cpu and then on the first m5 exit switch to timing cores.
> Alternatively you can pass init=/bin/bash or something to the kernel which
> will skip systemd (although it’ll mean that you’ll only load the kernel,
> and none of the Ubuntu services).
>
>
>
> Thanks,
>
> Kaustav.
>
>
>
>
>
> On Wed, Dec 6, 2023 at 1:09 PM saras nanda via gem5-users <
> gem5-users@gem5.org> wrote:
>
> Hello Everyone,
>
>
>
> I am doing a Full System simulation on ARM , I edited my image on qemu and
> installed all necessary files
>
>
>
> After that, I started the Gem5 FS using the following command,
>
>
>
> ./build/ARM/gem5.opt configs/example/arm/fs_power.py
> --kernel=/home/saras/gem5-resources/src/arm-ubuntu/gem5/full_system_images/binaries/vmlinux.arm64
> --disk=/home/saras/gem5-resources/src/arm-ubuntu/gem5/full_system_images/disks/arm64-ubuntu-server.img
> --caches
>
> The image gets booted up but takes a very long time to complete the
> process and I haven't reached the login part yet, but the whole thing takes
> about 7-8 hours to run halfway through.
>
>
>
> The m5term output is as follows.
>
>
>
>  m5 terminal: Terminal 0 
> [0.00] Booting Linux on physical CPU 0x00 [0x410fd070]
> [0.00] Linux version 4.18.0+ (arm-employee@arm-computer) (gcc
> version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1)) #1 SMP PREEMPT Wed
> Nov 6 14:10:00 GMT 2019
> [0.00] Machine model: V2P-CA15
> [0.00] earlycon: pl11 at MMIO 0x1c09 (options '')
> [0.00] bootconsole [pl11] enabled
> [0.00] Memory limited to 2048MB
> [0.00] cma: Reserved 16 MiB at 0xff00
> [0.00] On node 0 totalpages: 524288
> [0.00]   DMA32 zone: 8192 pages used for memmap
> [0.00]   DMA32 zone: 0 pages reserved
> [0.00]   DMA32 zone: 524288 pages, LIFO batch:31
> [0.00] random: get_random_bytes called from
> start_kernel+0xa8/0x3e8 with crng_init=0
> [0.00] percpu: Embedded 23 pages/cpu @(ptrval) s53976
> r8192 d32040 u94208
> [0.00] pcpu-alloc: s53976 r8192 d32040 u94208 alloc=23*4096
> [0.00] pcpu-alloc: [0] 0 [0] 1
&

[gem5-users] Re: Full System Simulation on ARM system takes too long

2023-12-17 Thread saras nanda via gem5-users
Hi , I tried this method , used gem5.fast it is still taking the same
amount of time , I tried running it with atomic CPU it doesn't allow me to
do so . i get the below error ,
warn: The `get_runtime_isa` function is deprecated. Please migrate away
from using this function.
fatal: The power example script requires 'timing' CPUs.

is there any other work around?

Regards
Srinija

On Sat, Dec 16, 2023 at 7:12 PM muke101  wrote:

> Run with '--cpu-type=atomic' and then use the m5 command to create a
> checkpoint from the terminal which can be restored with the timing CPU. It
> should take around 10-20 minutes to get to login with atomic. If able,
> build and use gem5.fast too.
>
>
> Sent from Proton Mail mobile
>
>
>
>  Original Message 
> On 17 Dec 2023, 00:05, saras nanda via gem5-users < gem5-users@gem5.org>
> wrote:
>
>
> Hello Everyone,
>
> I am doing a Full System simulation on ARM , I edited my image on qemu and
> installed all necessary files
>
> After that, I started the Gem5 FS using the following command,
>
> ./build/ARM/gem5.opt configs/example/arm/fs_power.py
> --kernel=/home/saras/gem5-resources/src/arm-ubuntu/gem5/full_system_images/binaries/vmlinux.arm64
> --disk=/home/saras/gem5-resources/src/arm-ubuntu/gem5/full_system_images/disks/arm64-ubuntu-server.img
> --caches
> The image gets booted up but takes a very long time to complete the
> process and I haven't reached the login part yet, but the whole thing takes
> about 7-8 hours to run halfway through.
>
> The m5term output is as follows.
>  m5 terminal: Terminal 0 
> [0.00] Booting Linux on physical CPU 0x00 [0x410fd070]
> [0.00] Linux version 4.18.0+ (arm-employee@arm-computer) (gcc
> version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1)) #1 SMP PREEMPT Wed
> Nov 6 14:10:00 GMT 2019
> [0.00] Machine model: V2P-CA15
> [0.00] earlycon: pl11 at MMIO 0x1c09 (options '')
> [0.00] bootconsole [pl11] enabled
> [0.00] Memory limited to 2048MB
> [0.00] cma: Reserved 16 MiB at 0xff00
> [0.00] On node 0 totalpages: 524288
> [0.00]   DMA32 zone: 8192 pages used for memmap
> [0.00]   DMA32 zone: 0 pages reserved
> [0.00]   DMA32 zone: 524288 pages, LIFO batch:31
> [0.00] random: get_random_bytes called from
> start_kernel+0xa8/0x3e8 with crng_init=0
> [0.00] percpu: Embedded 23 pages/cpu @(ptrval) s53976
> r8192 d32040 u94208
> [0.00] pcpu-alloc: s53976 r8192 d32040 u94208 alloc=23*4096
> [0.00] pcpu-alloc: [0] 0 [0] 1
> [0.00] Detected PIPT I-cache on CPU0
> [0.00] CPU features: enabling workaround for ARM erratum 832075
> [0.00] CPU features: enabling workaround for ARM erratum 834220
> [0.00] CPU features: enabling workaround for EL2 vector hardening
> [0.00] CPU features: detected: Kernel page table isolation (KPTI)
> [0.00] Built 1 zonelists, mobility grouping on.  Total pages:
> 516096
> [0.00] Kernel command line: earlyprintk earlycon=pl011,0x1c09
> console=ttyAMA0 lpj=19988480 norandmaps loglevel=8 mem=2GB root=/dev/vda1
> rw init=/sbin/init vmalloc=768MB
> [0.00] Dentry cache hash table entries: 262144 (order: 9, 2097152
> bytes)
> [0.00] Inode-cache hash table entries: 131072 (order: 8, 1048576
> bytes)
> [0.00] Memory: 2034232K/2097152K available (6910K kernel code,
> 452K rwdata, 2312K rodata, 448K init, 217K bss, 46536K reserved, 16384K
> cma-reserved)
> [0.00] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
> [0.00] Preemptible hierarchical RCU implementation.
> [0.00] RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=2.
> [0.00] Tasks RCU enabled.
> [0.00] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
> [0.00] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
> [0.00] GIC: GICv2 detected, but range too small and
> irqchip.gicv2_force_probe not set
> [0.00] clk_gem5_energy_ctrl: No cpu-map in DT! Falling back to old
> detection method!
> [0.00] clk_gem5_energy_ctrl: No clusters in DT! Falling back to
> using CPU topology!
> [0.02] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every
> 89478484971ns
> [0.000164] arch_timer: cp15 and mmio timer(s) running at 25.16MHz
> (phys/virt).
> [0.000230] clocksource: arch_sys_counter: mask: 0xff
> max_cycles: 0x5cdd39714, max_idle_ns: 440795202620 ns
> [0.000325] sched_clock: 56 bits at 25MHz, resolution 39ns, wraps every
> 4398046511084ns
> [0.000441] Console: colour dummy device 80x25
> [0.000486] Calibrating delay loop (skipped) preset value.. 9994.24
> BogoMIPS (lpj=19988480)
> [0.000561] pid_max: default: 32768 minimum: 301
> [0.000636] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
> [0.000699] Mountpoint-cache hash table entries: 4096 (order: 3, 32768
> bytes)
> [ 

[gem5-users] Re: Full System Simulation on ARM system takes too long

2023-12-17 Thread Giacomo Travaglini via gem5-users
Hi saras,

You are using a fully-fledged ubuntu distribution. May I suggest you a more 
lightweight solution?

Please have a look at the ubuntu18.04 option in 
https://www.gem5.org/documentation/general_docs/fullsystem/guest_binaries

Kind Regards

Giacomo

From: saras nanda via gem5-users 
Date: Friday, 15 December 2023 at 23:48
To: The gem5 Users mailing list 
Cc: Kaustav Goswami , muke...@protonmail.com 
, saras nanda 
Subject: [gem5-users] Re: Full System Simulation on ARM system takes too long
Even after hours of booting even 2-3 days consecutively my image wouldn't reach 
the login prompt to make the checkpointing it would reach
[  OK  ] Started Create Volatile Files and Directories.
 Starting Update UTMP about System Boot/Shutdown...
 Starting Network Time Synchronization...
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Started Network Time Synchronization.
[  OK  ] Reached target System Time Synchronized.

and then stay at this point forever and I cant even get the login prompt to do 
checkpointing etc etc

please let me know what can I do about this issue .

regards
saras

On Wed, Dec 6, 2023 at 4:35 PM Kaustav Goswami via gem5-users 
mailto:gem5-users@gem5.org>> wrote:
Hi Saras,

You’re booting up the disk image with timing cores and the disk’s init command 
is to load /sbin/init. It is expected that it’ll take 10ish hours to boot 
Ubuntu in this case. /sbin/init starts the default services for Ubuntu via 
systemd (
[0.314602] systemd[1]: System time before build time, advancing clock.). 
This takes a lot of time.


If you want to load the disk image faster then boot the disk image using kvm or 
atomic cpu and then on the first m5 exit switch to timing cores. Alternatively 
you can pass init=/bin/bash or something to the kernel which will skip systemd 
(although it’ll mean that you’ll only load the kernel, and none of the Ubuntu 
services).


Thanks,
Kaustav.


On Wed, Dec 6, 2023 at 1:09 PM saras nanda via gem5-users 
mailto:gem5-users@gem5.org>> wrote:
Hello Everyone,

I am doing a Full System simulation on ARM , I edited my image on qemu and 
installed all necessary files

After that, I started the Gem5 FS using the following command,

./build/ARM/gem5.opt configs/example/arm/fs_power.py 
--kernel=/home/saras/gem5-resources/src/arm-ubuntu/gem5/full_system_images/binaries/vmlinux.arm64
 
--disk=/home/saras/gem5-resources/src/arm-ubuntu/gem5/full_system_images/disks/arm64-ubuntu-server.img
 --caches
The image gets booted up but takes a very long time to complete the process and 
I haven't reached the login part yet, but the whole thing takes about 7-8 hours 
to run halfway through.

The m5term output is as follows.

 m5 terminal: Terminal 0 
[0.00] Booting Linux on physical CPU 0x00 [0x410fd070]
[0.00] Linux version 4.18.0+ (arm-employee@arm-computer) (gcc version 
7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1)) #1 SMP PREEMPT Wed Nov 6 14:10:00 
GMT 2019
[0.00] Machine model: V2P-CA15
[0.00] earlycon: pl11 at MMIO 0x1c09 (options '')
[0.00] bootconsole [pl11] enabled
[0.00] Memory limited to 2048MB
[0.00] cma: Reserved 16 MiB at 0xff00
[0.00] On node 0 totalpages: 524288
[0.00]   DMA32 zone: 8192 pages used for memmap
[0.00]   DMA32 zone: 0 pages reserved
[0.00]   DMA32 zone: 524288 pages, LIFO batch:31
[0.00] random: get_random_bytes called from start_kernel+0xa8/0x3e8 
with crng_init=0
[0.00] percpu: Embedded 23 pages/cpu @(ptrval) s53976 r8192 
d32040 u94208
[0.00] pcpu-alloc: s53976 r8192 d32040 u94208 alloc=23*4096
[0.00] pcpu-alloc: [0] 0 [0] 1
[0.00] Detected PIPT I-cache on CPU0
[0.00] CPU features: enabling workaround for ARM erratum 832075
[0.00] CPU features: enabling workaround for ARM erratum 834220
[0.00] CPU features: enabling workaround for EL2 vector hardening
[0.00] CPU features: detected: Kernel page table isolation (KPTI)
[0.00] Built 1 zonelists, mobility grouping on.  Total pages: 516096
[0.00] Kernel command line: earlyprintk earlycon=pl011,0x1c09 
console=ttyAMA0 lpj=19988480 norandmaps loglevel=8 mem=2GB root=/dev/vda1 rw 
init=/sbin/init vmalloc=768MB
[0.00] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[0.00] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[0.00] Memory: 2034232K/2097152K available (6910K kernel code, 452K 
rwdata, 2312K rodata, 448K init, 217K bss, 46536K reserved, 16384K cma-reserved)
[0.00] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[0.00] Preemptible hierarchical RCU implementation.
[0.00] RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=2.
[0.00] Tasks RCU enabled.
[0.00] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[0.00] NR_IRQS:

[gem5-users] Re: Full System Simulation on ARM system takes too long

2023-12-16 Thread muke101 via gem5-users
Run with '--cpu-type=atomic' and then use the m5 command to create a checkpoint 
from the terminal which can be restored with the timing CPU. It should take 
around 10-20 minutes to get to login with atomic. If able, build and use 
gem5.fast too.

Sent from Proton Mail mobile

 Original Message 
On 17 Dec 2023, 00:05, saras nanda via gem5-users wrote:

> Hello Everyone,
>
> I am doing a Full System simulation on ARM , I edited my image on qemu and 
> installed all necessary files
>
> After that, I started the Gem5 FS using the following command,
>
> ./build/ARM/gem5.opt configs/example/arm/fs_power.py 
> --kernel=/home/saras/gem5-resources/src/arm-ubuntu/gem5/full_system_images/binaries/vmlinux.arm64
>  
> --disk=/home/saras/gem5-resources/src/arm-ubuntu/gem5/full_system_images/disks/arm64-ubuntu-server.img
>  --caches
> The image gets booted up but takes a very long time to complete the process 
> and I haven't reached the login part yet, but the whole thing takes about 7-8 
> hours to run halfway through.
>
> The m5term output is as follows.
>  m5 terminal: Terminal 0 
> [ 0.00] Booting Linux on physical CPU 0x00 [0x410fd070]
> [ 0.00] Linux version 4.18.0+ (arm-employee@arm-computer) (gcc version 
> 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1)) #1 SMP PREEMPT Wed Nov 6 
> 14:10:00 GMT 2019
> [ 0.00] Machine model: V2P-CA15
> [ 0.00] earlycon: pl11 at MMIO 0x1c09 (options '')
> [ 0.00] bootconsole [pl11] enabled
> [ 0.00] Memory limited to 2048MB
> [ 0.00] cma: Reserved 16 MiB at 0xff00
> [ 0.00] On node 0 totalpages: 524288
> [ 0.00] DMA32 zone: 8192 pages used for memmap
> [ 0.00] DMA32 zone: 0 pages reserved
> [ 0.00] DMA32 zone: 524288 pages, LIFO batch:31
> [ 0.00] random: get_random_bytes called from start_kernel+0xa8/0x3e8 with 
> crng_init=0
> [ 0.00] percpu: Embedded 23 pages/cpu @(ptrval) s53976 r8192 
> d32040 u94208
> [ 0.00] pcpu-alloc: s53976 r8192 d32040 u94208 alloc=23*4096
> [ 0.00] pcpu-alloc: [0] 0 [0] 1
> [ 0.00] Detected PIPT I-cache on CPU0
> [ 0.00] CPU features: enabling workaround for ARM erratum 832075
> [ 0.00] CPU features: enabling workaround for ARM erratum 834220
> [ 0.00] CPU features: enabling workaround for EL2 vector hardening
> [ 0.00] CPU features: detected: Kernel page table isolation (KPTI)
> [ 0.00] Built 1 zonelists, mobility grouping on. Total pages: 516096
> [ 0.00] Kernel command line: earlyprintk earlycon=pl011,0x1c09 
> console=ttyAMA0 lpj=19988480 norandmaps loglevel=8 mem=2GB root=/dev/vda1 rw 
> init=/sbin/init vmalloc=768MB
> [ 0.00] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
> [ 0.00] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
> [ 0.00] Memory: 2034232K/2097152K available (6910K kernel code, 452K 
> rwdata, 2312K rodata, 448K init, 217K bss, 46536K reserved, 16384K 
> cma-reserved)
> [ 0.00] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
> [ 0.00] Preemptible hierarchical RCU implementation.
> [ 0.00] RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=2.
> [ 0.00] Tasks RCU enabled.
> [ 0.00] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
> [ 0.00] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
> [ 0.00] GIC: GICv2 detected, but range too small and 
> irqchip.gicv2_force_probe not set
> [ 0.00] clk_gem5_energy_ctrl: No cpu-map in DT! Falling back to old 
> detection method!
> [ 0.00] clk_gem5_energy_ctrl: No clusters in DT! Falling back to using 
> CPU topology!
> [ 0.02] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 
> 89478484971ns
> [ 0.000164] arch_timer: cp15 and mmio timer(s) running at 25.16MHz 
> (phys/virt).
> [ 0.000230] clocksource: arch_sys_counter: mask: 0xff max_cycles: 
> 0x5cdd39714, max_idle_ns: 440795202620 ns
> [ 0.000325] sched_clock: 56 bits at 25MHz, resolution 39ns, wraps every 
> 4398046511084ns
> [ 0.000441] Console: colour dummy device 80x25
> [ 0.000486] Calibrating delay loop (skipped) preset value.. 9994.24 BogoMIPS 
> (lpj=19988480)
> [ 0.000561] pid_max: default: 32768 minimum: 301
> [ 0.000636] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
> [ 0.000699] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
> [ 0.024160] ASID allocator initialised with 128 entries
> [ 0.032160] Hierarchical SRCU implementation.
> [ 0.048176] smp: Bringing up secondary CPUs ...
> [ 0.080242] Detected PIPT I-cache on CPU1
> [ 0.080298] CPU1: Booted secondary processor 0x000101 [0x410fd070]
> [ 0.080414] smp: Brought up 1 node, 2 CPUs
> [ 0.080542] SMP: Total of 2 processors activated.
> [ 0.080585] CPU features: detected: Privileged Access Never
> [ 0.080634] CPU features: detected: User Access Override
> [ 0.080682] CPU features: detected: 32-bit EL0 Support
> [ 0.080728] CPU features: detected: Scalable 

[gem5-users] Re: Full System Simulation on ARM system takes too long

2023-12-15 Thread saras nanda via gem5-users
Even after hours of booting even 2-3 days consecutively my image wouldn't
reach the login prompt to make the checkpointing it would reach
[  OK  ] Started Create Volatile Files and Directories.
 Starting Update UTMP about System Boot/Shutdown...
 Starting Network Time Synchronization...
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Started Network Time Synchronization.
[  OK  ] Reached target System Time Synchronized.

and then stay at this point forever and I cant even get the login prompt to
do checkpointing etc etc

please let me know what can I do about this issue .

regards
saras

On Wed, Dec 6, 2023 at 4:35 PM Kaustav Goswami via gem5-users <
gem5-users@gem5.org> wrote:

> Hi Saras,
>
> You’re booting up the disk image with timing cores and the disk’s init
> command is to load /sbin/init. It is expected that it’ll take 10ish hours
> to boot Ubuntu in this case. /sbin/init starts the default services for
> Ubuntu via systemd (
> [0.314602] systemd[1]: System time before build time, advancing
> clock.). This takes a lot of time.
>
> If you want to load the disk image faster then boot the disk image using
> kvm or atomic cpu and then on the first m5 exit switch to timing cores.
> Alternatively you can pass init=/bin/bash or something to the kernel which
> will skip systemd (although it’ll mean that you’ll only load the kernel,
> and none of the Ubuntu services).
>
> Thanks,
> Kaustav.
>
>
> On Wed, Dec 6, 2023 at 1:09 PM saras nanda via gem5-users <
> gem5-users@gem5.org> wrote:
>
>> Hello Everyone,
>>
>> I am doing a Full System simulation on ARM , I edited my image on qemu
>> and installed all necessary files
>>
>> After that, I started the Gem5 FS using the following command,
>>
>> ./build/ARM/gem5.opt configs/example/arm/fs_power.py
>> --kernel=/home/saras/gem5-resources/src/arm-ubuntu/gem5/full_system_images/binaries/vmlinux.arm64
>> --disk=/home/saras/gem5-resources/src/arm-ubuntu/gem5/full_system_images/disks/arm64-ubuntu-server.img
>> --caches
>> The image gets booted up but takes a very long time to complete the
>> process and I haven't reached the login part yet, but the whole thing takes
>> about 7-8 hours to run halfway through.
>>
>> The m5term output is as follows.
>>
>>  m5 terminal: Terminal 0 
>> [0.00] Booting Linux on physical CPU 0x00 [0x410fd070]
>> [0.00] Linux version 4.18.0+ (arm-employee@arm-computer) (gcc
>> version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1)) #1 SMP PREEMPT Wed
>> Nov 6 14:10:00 GMT 2019
>> [0.00] Machine model: V2P-CA15
>> [0.00] earlycon: pl11 at MMIO 0x1c09 (options '')
>> [0.00] bootconsole [pl11] enabled
>> [0.00] Memory limited to 2048MB
>> [0.00] cma: Reserved 16 MiB at 0xff00
>> [0.00] On node 0 totalpages: 524288
>> [0.00]   DMA32 zone: 8192 pages used for memmap
>> [0.00]   DMA32 zone: 0 pages reserved
>> [0.00]   DMA32 zone: 524288 pages, LIFO batch:31
>> [0.00] random: get_random_bytes called from
>> start_kernel+0xa8/0x3e8 with crng_init=0
>> [0.00] percpu: Embedded 23 pages/cpu @(ptrval) s53976
>> r8192 d32040 u94208
>> [0.00] pcpu-alloc: s53976 r8192 d32040 u94208 alloc=23*4096
>> [0.00] pcpu-alloc: [0] 0 [0] 1
>> [0.00] Detected PIPT I-cache on CPU0
>> [0.00] CPU features: enabling workaround for ARM erratum 832075
>> [0.00] CPU features: enabling workaround for ARM erratum 834220
>> [0.00] CPU features: enabling workaround for EL2 vector hardening
>> [0.00] CPU features: detected: Kernel page table isolation (KPTI)
>> [0.00] Built 1 zonelists, mobility grouping on.  Total pages:
>> 516096
>> [0.00] Kernel command line: earlyprintk earlycon=pl011,0x1c09
>> console=ttyAMA0 lpj=19988480 norandmaps loglevel=8 mem=2GB root=/dev/vda1
>> rw init=/sbin/init vmalloc=768MB
>> [0.00] Dentry cache hash table entries: 262144 (order: 9, 2097152
>> bytes)
>> [0.00] Inode-cache hash table entries: 131072 (order: 8, 1048576
>> bytes)
>> [0.00] Memory: 2034232K/2097152K available (6910K kernel code,
>> 452K rwdata, 2312K rodata, 448K init, 217K bss, 46536K reserved, 16384K
>> cma-reserved)
>> [0.00] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
>> [0.00] Preemptible hierarchical RCU implementation.
>> [0.00] RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=2.
>> [0.00] Tasks RCU enabled.
>> [0.00] RCU: Adjusting geometry for rcu_fanout_leaf=16,
>> nr_cpu_ids=2
>> [0.00] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
>> [0.00] GIC: GICv2 detected, but range too small and
>> irqchip.gicv2_force_probe not set
>> [0.00] clk_gem5_energy_ctrl: No cpu-map in DT! Falling back to
>> old detection method!
>> [0.00] clk_gem5_energy_ctrl: No clusters in DT! Falling back to
>> using CPU topology!
>> 

[gem5-users] Re: Full System Simulation on ARM system takes too long

2023-12-06 Thread Kaustav Goswami via gem5-users
Hi Saras,

You’re booting up the disk image with timing cores and the disk’s init
command is to load /sbin/init. It is expected that it’ll take 10ish hours
to boot Ubuntu in this case. /sbin/init starts the default services for
Ubuntu via systemd (
[0.314602] systemd[1]: System time before build time, advancing
clock.). This takes a lot of time.

If you want to load the disk image faster then boot the disk image using
kvm or atomic cpu and then on the first m5 exit switch to timing cores.
Alternatively you can pass init=/bin/bash or something to the kernel which
will skip systemd (although it’ll mean that you’ll only load the kernel,
and none of the Ubuntu services).

Thanks,
Kaustav.


On Wed, Dec 6, 2023 at 1:09 PM saras nanda via gem5-users <
gem5-users@gem5.org> wrote:

> Hello Everyone,
>
> I am doing a Full System simulation on ARM , I edited my image on qemu and
> installed all necessary files
>
> After that, I started the Gem5 FS using the following command,
>
> ./build/ARM/gem5.opt configs/example/arm/fs_power.py
> --kernel=/home/saras/gem5-resources/src/arm-ubuntu/gem5/full_system_images/binaries/vmlinux.arm64
> --disk=/home/saras/gem5-resources/src/arm-ubuntu/gem5/full_system_images/disks/arm64-ubuntu-server.img
> --caches
> The image gets booted up but takes a very long time to complete the
> process and I haven't reached the login part yet, but the whole thing takes
> about 7-8 hours to run halfway through.
>
> The m5term output is as follows.
>
>  m5 terminal: Terminal 0 
> [0.00] Booting Linux on physical CPU 0x00 [0x410fd070]
> [0.00] Linux version 4.18.0+ (arm-employee@arm-computer) (gcc
> version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1)) #1 SMP PREEMPT Wed
> Nov 6 14:10:00 GMT 2019
> [0.00] Machine model: V2P-CA15
> [0.00] earlycon: pl11 at MMIO 0x1c09 (options '')
> [0.00] bootconsole [pl11] enabled
> [0.00] Memory limited to 2048MB
> [0.00] cma: Reserved 16 MiB at 0xff00
> [0.00] On node 0 totalpages: 524288
> [0.00]   DMA32 zone: 8192 pages used for memmap
> [0.00]   DMA32 zone: 0 pages reserved
> [0.00]   DMA32 zone: 524288 pages, LIFO batch:31
> [0.00] random: get_random_bytes called from
> start_kernel+0xa8/0x3e8 with crng_init=0
> [0.00] percpu: Embedded 23 pages/cpu @(ptrval) s53976
> r8192 d32040 u94208
> [0.00] pcpu-alloc: s53976 r8192 d32040 u94208 alloc=23*4096
> [0.00] pcpu-alloc: [0] 0 [0] 1
> [0.00] Detected PIPT I-cache on CPU0
> [0.00] CPU features: enabling workaround for ARM erratum 832075
> [0.00] CPU features: enabling workaround for ARM erratum 834220
> [0.00] CPU features: enabling workaround for EL2 vector hardening
> [0.00] CPU features: detected: Kernel page table isolation (KPTI)
> [0.00] Built 1 zonelists, mobility grouping on.  Total pages:
> 516096
> [0.00] Kernel command line: earlyprintk earlycon=pl011,0x1c09
> console=ttyAMA0 lpj=19988480 norandmaps loglevel=8 mem=2GB root=/dev/vda1
> rw init=/sbin/init vmalloc=768MB
> [0.00] Dentry cache hash table entries: 262144 (order: 9, 2097152
> bytes)
> [0.00] Inode-cache hash table entries: 131072 (order: 8, 1048576
> bytes)
> [0.00] Memory: 2034232K/2097152K available (6910K kernel code,
> 452K rwdata, 2312K rodata, 448K init, 217K bss, 46536K reserved, 16384K
> cma-reserved)
> [0.00] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
> [0.00] Preemptible hierarchical RCU implementation.
> [0.00] RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=2.
> [0.00] Tasks RCU enabled.
> [0.00] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
> [0.00] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
> [0.00] GIC: GICv2 detected, but range too small and
> irqchip.gicv2_force_probe not set
> [0.00] clk_gem5_energy_ctrl: No cpu-map in DT! Falling back to old
> detection method!
> [0.00] clk_gem5_energy_ctrl: No clusters in DT! Falling back to
> using CPU topology!
> [0.02] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every
> 89478484971ns
> [0.000164] arch_timer: cp15 and mmio timer(s) running at 25.16MHz
> (phys/virt).
> [0.000230] clocksource: arch_sys_counter: mask: 0xff
> max_cycles: 0x5cdd39714, max_idle_ns: 440795202620 ns
> [0.000325] sched_clock: 56 bits at 25MHz, resolution 39ns, wraps every
> 4398046511084ns
> [0.000441] Console: colour dummy device 80x25
> [0.000486] Calibrating delay loop (skipped) preset value.. 9994.24
> BogoMIPS (lpj=19988480)
> [0.000561] pid_max: default: 32768 minimum: 301
> [0.000636] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
> [0.000699] Mountpoint-cache hash table entries: 4096 (order: 3, 32768
> bytes)
> [0.024160] ASID allocator initialised with 128 entries

[gem5-users] Re: Full System Simulation on ARM system takes too long

2023-12-06 Thread muke101 via gem5-users
Hey, this is perfectly expected as you're not using an atomic cpu model. Even 
with atomic it'll take 10-20 minutes. It seems the fs_power.py script only 
works with timing CPUs, so if you have to use that config (and can't switch to 
something that lets you use atomic or better yet KVM), your best bet is to 
checkpoint the system after boot and right before you run the relevant part of 
your test using an atomic CPU, then restore it with the fs_power script and the 
slower, more detailed CPU. Another trick is to compile gem5.fast instead of 
gem5.opt if you don't need the debugging info :)

Sent with [Proton Mail](https://proton.me/) secure email.

On Wednesday, 6 December 2023 at 21:02, saras nanda via gem5-users 
 wrote:

> Hello Everyone,
>
> I am doing a Full System simulation on ARM , I edited my image on qemu and 
> installed all necessary files
>
> After that, I started the Gem5 FS using the following command,
>
> ./build/ARM/gem5.opt configs/example/arm/fs_power.py 
> --kernel=/home/saras/gem5-resources/src/arm-ubuntu/gem5/full_system_images/binaries/vmlinux.arm64
>  
> --disk=/home/saras/gem5-resources/src/arm-ubuntu/gem5/full_system_images/disks/arm64-ubuntu-server.img
>  --caches
> The image gets booted up but takes a very long time to complete the process 
> and I haven't reached the login part yet, but the whole thing takes about 7-8 
> hours to run halfway through.
>
> The m5term output is as follows.
>
>  m5 terminal: Terminal 0 
> [ 0.00] Booting Linux on physical CPU 0x00 [0x410fd070]
> [ 0.00] Linux version 4.18.0+ (arm-employee@arm-computer) (gcc version 
> 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1)) #1 SMP PREEMPT Wed Nov 6 
> 14:10:00 GMT 2019
> [ 0.00] Machine model: V2P-CA15
> [ 0.00] earlycon: pl11 at MMIO 0x1c09 (options '')
> [ 0.00] bootconsole [pl11] enabled
> [ 0.00] Memory limited to 2048MB
> [ 0.00] cma: Reserved 16 MiB at 0xff00
> [ 0.00] On node 0 totalpages: 524288
> [ 0.00] DMA32 zone: 8192 pages used for memmap
> [ 0.00] DMA32 zone: 0 pages reserved
> [ 0.00] DMA32 zone: 524288 pages, LIFO batch:31
> [ 0.00] random: get_random_bytes called from start_kernel+0xa8/0x3e8 with 
> crng_init=0
> [ 0.00] percpu: Embedded 23 pages/cpu @(ptrval) s53976 r8192 
> d32040 u94208
> [ 0.00] pcpu-alloc: s53976 r8192 d32040 u94208 alloc=23*4096
> [ 0.00] pcpu-alloc: [0] 0 [0] 1
> [ 0.00] Detected PIPT I-cache on CPU0
> [ 0.00] CPU features: enabling workaround for ARM erratum 832075
> [ 0.00] CPU features: enabling workaround for ARM erratum 834220
> [ 0.00] CPU features: enabling workaround for EL2 vector hardening
> [ 0.00] CPU features: detected: Kernel page table isolation (KPTI)
> [ 0.00] Built 1 zonelists, mobility grouping on. Total pages: 516096
> [ 0.00] Kernel command line: earlyprintk earlycon=pl011,0x1c09 
> console=ttyAMA0 lpj=19988480 norandmaps loglevel=8 mem=2GB root=/dev/vda1 rw 
> init=/sbin/init vmalloc=768MB
> [ 0.00] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
> [ 0.00] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
> [ 0.00] Memory: 2034232K/2097152K available (6910K kernel code, 452K 
> rwdata, 2312K rodata, 448K init, 217K bss, 46536K reserved, 16384K 
> cma-reserved)
> [ 0.00] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
> [ 0.00] Preemptible hierarchical RCU implementation.
> [ 0.00] RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=2.
> [ 0.00] Tasks RCU enabled.
> [ 0.00] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
> [ 0.00] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
> [ 0.00] GIC: GICv2 detected, but range too small and 
> irqchip.gicv2_force_probe not set
> [ 0.00] clk_gem5_energy_ctrl: No cpu-map in DT! Falling back to old 
> detection method!
> [ 0.00] clk_gem5_energy_ctrl: No clusters in DT! Falling back to using 
> CPU topology!
> [ 0.02] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 
> 89478484971ns
> [ 0.000164] arch_timer: cp15 and mmio timer(s) running at 25.16MHz 
> (phys/virt).
> [ 0.000230] clocksource: arch_sys_counter: mask: 0xff max_cycles: 
> 0x5cdd39714, max_idle_ns: 440795202620 ns
> [ 0.000325] sched_clock: 56 bits at 25MHz, resolution 39ns, wraps every 
> 4398046511084ns
> [ 0.000441] Console: colour dummy device 80x25
> [ 0.000486] Calibrating delay loop (skipped) preset value.. 9994.24 BogoMIPS 
> (lpj=19988480)
> [ 0.000561] pid_max: default: 32768 minimum: 301
> [ 0.000636] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
> [ 0.000699] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
> [ 0.024160] ASID allocator initialised with 128 entries
> [ 0.032160] Hierarchical SRCU implementation.
> [ 0.048176] smp: Bringing up secondary CPUs ...
> [ 0.080242] Detected PIPT I-cache on CPU1
> [ 0.080298] CPU1: Booted