mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
readme: rerun gem5-bench-caches and take some conclusions
This commit is contained in:
91
README.adoc
91
README.adoc
@@ -2681,8 +2681,8 @@ gem5:
|
|||||||
....
|
....
|
||||||
./run -a aarch64 -g -E 'm5 exit'
|
./run -a aarch64 -g -E 'm5 exit'
|
||||||
# Or:
|
# Or:
|
||||||
# ./run -a arm -g -E 'm5 exit' -- --cpu-type=HPI --caches
|
# ./run -a aarch64 -g -E 'm5 exit' -- --cpu-type=HPI --caches
|
||||||
grep sim_insts out/aarch64/gem5/m5out/stats.txt
|
./gem5-stat -a aarch64 sim_insts
|
||||||
....
|
....
|
||||||
|
|
||||||
Notes:
|
Notes:
|
||||||
@@ -3662,37 +3662,48 @@ cat out/aarch64/gem5/bench-cache.txt
|
|||||||
|
|
||||||
which gives:
|
which gives:
|
||||||
|
|
||||||
[options="header",cols="3*>"]
|
....
|
||||||
|===
|
n 1000
|
||||||
|test size
|
cmd ./run -a arm -g -- -r 1 --caches --l2cache --l1d_size=1024 --l1i_size=1024 --l2_size=1024 --l3_size=1024 --cpu-type=HPI --restore-with-cpu=HPI
|
||||||
|cache size
|
time 24.71
|
||||||
|cycle count
|
exit_status 0
|
||||||
|
cycles 52386455
|
||||||
|
instructions 4555081
|
||||||
|
cmd ./run -a arm -g -- -r 1 --caches --l2cache --l1d_size=1024kB --l1i_size=1024kB --l2_size=1024kB --l3_size=1024kB --cpu-type=HPI --restore-with-cpu=HPI
|
||||||
|
time 17.44
|
||||||
|
exit_status 0
|
||||||
|
cycles 6683355
|
||||||
|
instructions 4466051
|
||||||
|
|
||||||
|1000
|
n 10000
|
||||||
|1k
|
cmd ./run -a arm -g -- -r 1 --caches --l2cache --l1d_size=1024 --l1i_size=1024 --l2_size=1024 --l3_size=1024 --cpu-type=HPI --restore-with-cpu=HPI
|
||||||
|52.432.956
|
time 52.90
|
||||||
|
exit_status 0
|
||||||
|
cycles 165704397
|
||||||
|
instructions 11531136
|
||||||
|
cmd ./run -a arm -g -- -r 1 --caches --l2cache --l1d_size=1024kB --l1i_size=1024kB --l2_size=1024kB --l3_size=1024kB --cpu-type=HPI --restore-with-cpu=HPI
|
||||||
|
time 36.19
|
||||||
|
exit_status 0
|
||||||
|
cycles 16182925
|
||||||
|
instructions 11422585
|
||||||
|
|
||||||
|1000
|
n 100000
|
||||||
|1M
|
cmd ./run -a arm -g -- -r 1 --caches --l2cache --l1d_size=1024 --l1i_size=1024 --l2_size=1024 --l3_size=1024 --cpu-type=HPI --restore-with-cpu=HPI
|
||||||
|6.328.325
|
time 325.09
|
||||||
|
exit_status 0
|
||||||
|
cycles 1295703657
|
||||||
|
instructions 81189411
|
||||||
|
cmd ./run -a arm -g -- -r 1 --caches --l2cache --l1d_size=1024kB --l1i_size=1024kB --l2_size=1024kB --l3_size=1024kB --cpu-type=HPI --restore-with-cpu=HPI
|
||||||
|
time 250.74
|
||||||
|
exit_status 0
|
||||||
|
cycles 110585681
|
||||||
|
instructions 80899588
|
||||||
|
....
|
||||||
|
|
||||||
|10000
|
We make the following conclusions:
|
||||||
|1k
|
|
||||||
|141.637.834
|
|
||||||
|
|
||||||
|10000
|
* the number of instructions almost does not change: the CPU is waiting for memory all the extra time. TODO: why does it change at all?
|
||||||
|1M
|
* the wall clock execution time is not directionally proportional to the number of cycles: here we had a 10x cycle increase, but only 2x time increase
|
||||||
|16.969.057
|
|
||||||
|
|
||||||
|100000
|
|
||||||
|1k
|
|
||||||
|1.034.500.724
|
|
||||||
|
|
||||||
|100000
|
|
||||||
|1M
|
|
||||||
|121.728.035
|
|
||||||
|
|
||||||
|===
|
|
||||||
|
|
||||||
===== gem5 memory latency
|
===== gem5 memory latency
|
||||||
|
|
||||||
@@ -4892,43 +4903,43 @@ Output on <<p51>> fb317f4778633692b91c9174224dccc6a3a02893:
|
|||||||
....
|
....
|
||||||
cmd ./run -a x86_64 -E '/poweroff.out'
|
cmd ./run -a x86_64 -E '/poweroff.out'
|
||||||
time 4.00
|
time 4.00
|
||||||
status 0
|
exit_status 0
|
||||||
cmd ./run -a x86_64 -E '/poweroff.out' -K
|
cmd ./run -a x86_64 -E '/poweroff.out' -K
|
||||||
time 1.32
|
time 1.32
|
||||||
status 0
|
exit_status 0
|
||||||
cmd ./run -a x86_64 -E '/poweroff.out' -T exec_tb
|
cmd ./run -a x86_64 -E '/poweroff.out' -T exec_tb
|
||||||
time 5.00
|
time 5.00
|
||||||
status 0
|
exit_status 0
|
||||||
instructions 7014180
|
instructions 7014180
|
||||||
cmd ./run -a x86_64 -E 'm5 exit' -g
|
cmd ./run -a x86_64 -E 'm5 exit' -g
|
||||||
time 389.39
|
time 389.39
|
||||||
status 0
|
exit_status 0
|
||||||
instructions 645396324
|
instructions 645396324
|
||||||
cmd ./run -a arm -E '/poweroff.out'
|
cmd ./run -a arm -E '/poweroff.out'
|
||||||
time 1.82
|
time 1.82
|
||||||
status 0
|
exit_status 0
|
||||||
cmd ./run -a arm -E '/poweroff.out' -T exec_tb
|
cmd ./run -a arm -E '/poweroff.out' -T exec_tb
|
||||||
time 2.11
|
time 2.11
|
||||||
status 0
|
exit_status 0
|
||||||
instructions 687532
|
instructions 687532
|
||||||
cmd ./run -a arm -E 'm5 exit' -g
|
cmd ./run -a arm -E 'm5 exit' -g
|
||||||
time 88.59
|
time 88.59
|
||||||
status 0
|
exit_status 0
|
||||||
instructions 142359498
|
instructions 142359498
|
||||||
cmd ./run -a aarch64 -E '/poweroff.out'
|
cmd ./run -a aarch64 -E '/poweroff.out'
|
||||||
time 1.34
|
time 1.34
|
||||||
status 0
|
exit_status 0
|
||||||
cmd ./run -a aarch64 -E '/poweroff.out' -T exec_tb
|
cmd ./run -a aarch64 -E '/poweroff.out' -T exec_tb
|
||||||
time 1.35
|
time 1.35
|
||||||
status 0
|
exit_status 0
|
||||||
instructions 179564
|
instructions 179564
|
||||||
cmd ./run -a aarch64 -E 'm5 exit' -g
|
cmd ./run -a aarch64 -E 'm5 exit' -g
|
||||||
time 58.18
|
time 58.18
|
||||||
status 0
|
exit_status 0
|
||||||
instructions 116389714
|
instructions 116389714
|
||||||
cmd ./run -a aarch64 -E 'm5 exit' -g -- --cpu-type=HPI --caches --l2cache --l1d_size=1024kB --l1i_size=1024kB --l2_size=1024kB --l3_size=1024kB
|
cmd ./run -a aarch64 -E 'm5 exit' -g -- --cpu-type=HPI --caches --l2cache --l1d_size=1024kB --l1i_size=1024kB --l2_size=1024kB --l3_size=1024kB
|
||||||
time 355.81
|
time 355.81
|
||||||
status 0
|
exit_status 0
|
||||||
instructions 116508439
|
instructions 116508439
|
||||||
....
|
....
|
||||||
|
|
||||||
|
|||||||
4
common
4
common
@@ -12,12 +12,12 @@ common_bench_cmd() (
|
|||||||
#
|
#
|
||||||
# cmd <command run>
|
# cmd <command run>
|
||||||
# time <time in seconds to finish>
|
# time <time in seconds to finish>
|
||||||
# status <exit status>
|
# exit_status <exit status>
|
||||||
cmd="$1"
|
cmd="$1"
|
||||||
results_file="$2"
|
results_file="$2"
|
||||||
printf 'cmd ' >> "$results_file"
|
printf 'cmd ' >> "$results_file"
|
||||||
env time --append -f 'time %e' --output="$results_file" ./eeval -a "$cmd" "$results_file"
|
env time --append -f 'time %e' --output="$results_file" ./eeval -a "$cmd" "$results_file"
|
||||||
printf "status $?\n" >> "$results_file"
|
printf "exit_status $?\n" >> "$results_file"
|
||||||
)
|
)
|
||||||
set_common_vars() {
|
set_common_vars() {
|
||||||
arch="$1"
|
arch="$1"
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ bench() (
|
|||||||
{
|
{
|
||||||
printf 'cycles '
|
printf 'cycles '
|
||||||
./gem5-stat -a "$arch"
|
./gem5-stat -a "$arch"
|
||||||
|
printf 'instructions '
|
||||||
|
./gem5-stat -a "$arch" sim_insts
|
||||||
# RESTORE_INVESTIGATION
|
# RESTORE_INVESTIGATION
|
||||||
#cycles_switch="$(./gem5-stat -a "$arch" system.switch_cpus.numCycles)"
|
#cycles_switch="$(./gem5-stat -a "$arch" system.switch_cpus.numCycles)"
|
||||||
#if [ -n "$cycles_switch" ]; then
|
#if [ -n "$cycles_switch" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user