Hey Krishnan, I know very little about Ciro Santili's scripts, so I struggle to see what you're doing. I suspect in this example you are _just_ booting the kernel with literally nothing else (and possibly on the Atomic CPU?). This will be faster than a complete OS boot, but I normally run on the assumption people want to do a bit more in their simulations than just to boot the kernel.
Given what you're saying I think you need to do some research and understand the difference between the kernel, and an OS like Ubuntu, and what you actually want to boot, run, and test using gem5. Booting the kernel is just the first part in booting a modern OS like Ubuntu. The latter will obviously take longer than the former but they are two different things. It's apples and oranges. I wouldn't focus too much on reducing simulation time. I think you need to think about what you actually want to simulate, what data you want to gather, and work from there. The simulation time is going to be dependent on how accurate you need a simulation to be, and what you are simulating. Bigger workloads are obviously going to take longer. We provide some boot tests which may be of benefit to you: https://gem5.googlesource.com/public/gem5-resources/+/refs/heads/stable/src/boot-exit/README.md. I'll outline below how to use them. They may be of benefit in your research: ``` git clone https://gem5.googlesource.com/public/gem5 cd gem5 git clone https://gem5.googlesource.com/public/gem5-resources wget http://dist.gem5.org/dist/v20-1/kernels/x86/static/vmlinux-5.4.49 #This is the Linux Kernel. wget http://dist.gem5.org/dist/v20-1/images/x86/ubuntu-18-04/boot-exit.img.gz #This is the disk image (it is ubuntu 18.04). gzip -d boot-exit.img.gz scons build/X86/gem5.opt # Use the -j flag to specify the number of cores for faster compilation. # The following runs the simulation. It takes the format `<gem5> gem5-resources/src/boot-exit/configs/run_exit.py vmlinux-5.4.49 boot-exit.img <cpu_type> <mem_sys> <num_cpus> <boot_type>` # <cpu_type> : `kvm`, `atomic`, `simple`, or `o3` --- As discussed before, I think you want to use `simple`. # <mem_sys>: `classic`, `MI_example`, `MESI_Two_Level`, or `MOESI_CMP_directory` # <num_cpus>: number of CPUs # <boot_type>: `init` or `systemd` --- This will make a big difference to simulation time, though `init` boots the kernel and literally nothing else. The simulation will exit after kernel initialization. `systemd` continues running the simulation to runlevel 5 and the user is logged in. As you can imagine, the latter here is a much larger task than the former. ./builds/X86/gem5.opt gem5-resources/src/boot-exit/configs/run_exit.py vmlinux-5.4.49 boot-exit.img simple classic 4 init ``` I hope this has been helpful. kind regards, Bobby -- Dr. Bobby R. Bruce Room 2235, Kemper Hall, UC Davis Davis, CA, 95616 web: https://www.bobbybruce.net On Fri, Oct 16, 2020 at 6:11 AM krishnan gosakan via gem5-users < gem5-users@gem5.org> wrote: > > Hi Bobby, > Thank you for your response. You have mentioned that linux takes longer to boot. I just want to confirm if it is linux or ubuntu which is making the boot time longer. > I just found a GitHub repo ( https://github.com/cirosantilli/linux-kernel-module-cheat) which uses buildroot instead of ubuntu and in my machine it takes only 5 or 6 minutes to boot. > So, if ubuntu (or linux) is the cause for slower boot, then can you suggest any other way to speed up the booting process. > > Also, thank you for clarifying my doubt regarding KVM CPU. I was puzzled why there is no stats after running kvm. So, I will be using TimingSimpleCPU for my work. Thank you for suggesting this. > > On Fri, Oct 16, 2020 at 5:31 AM Gambord, Ryan <gambo...@oregonstate.edu> wrote: >> >> Krishnan, >> >> I am having some trouble with getting X86KvmCPU to run on my server. Could you share the commit hash you are using successfully? >> >> Ryan Gambord >> <gambo...@oregonstate.edu> >> >> >> >> On Thu, Oct 15, 2020 at 1:49 AM krishnan gosakan via gem5-users < gem5-users@gem5.org> wrote: >>> >>> [This email originated from outside of OSU. Use caution with links and attachments.] >>> >>> Hi all. >>> I hope everyone is doing good. I recently started working with gem5 simulator. I am trying to do some modification to the page table walker (pagetable_walker). My problem is that booting linux under full system emulation is very slow. It takes nearly 30 to 40 minutes to boot. I am using AtomicSimpleCPU. I just want to know if this is the normal case for this cpu type. >>> >>> I also tried with X86KvmCPU and I used the following command, >>> $gem5_dir/build/X86/gem5.opt $gem5_config_dir/example/fs.py --kernel $linux_dir/vmlinux --disk-image $cur_dir/qemu-image.img --caches --l2cache --cpu-type X86KvmCPU --fast-forward 1000000000 >>> >>> This was faster than atomic simple cpu but the problem here is that all stats are cleared up at the end. I shall attach an example stat file with this email. In the stat file attached, you may see all the tlb stats cleared. I wish to know the reason why stats are cleared in examples/fs.py >>> >>> I just want to know if there is any way to fasten boot up with an atomic simple cpu or is this normal? My work is basically to change the kernel, compile it, run under gem5 and check the stats. >>> Any kind of suggestions are most appreciated. >>> Thank you. >>> -- >>> Regards, >>> Krishnan. >>> _______________________________________________ >>> gem5-users mailing list -- gem5-users@gem5.org >>> To unsubscribe send an email to gem5-users-le...@gem5.org >>> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s > > > > -- > Regards, > Krishnan. > _______________________________________________ > gem5-users mailing list -- gem5-users@gem5.org > To unsubscribe send an email to gem5-users-le...@gem5.org > %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
_______________________________________________ gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-le...@gem5.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s