diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-04-03 16:45:22 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-04-03 18:32:07 +0100 |
commit | 1a501723029ac519aca0f7c633cda0133ac5141a (patch) | |
tree | f753bdcea71b89f09d4b84a1334220a23fde0f88 /benchmarks | |
parent | eac26718e62a0c7cb5506f2cf188a4cac4794726 (diff) |
benchmarks: Include my ezbench test runners
Just a set of scripts to integrate these benchmarks with ezbench. They
need to be revised to plugin into latest version of ezbench.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'benchmarks')
-rw-r--r-- | benchmarks/ezbench.d/gem_blt.test | 34 | ||||
-rw-r--r-- | benchmarks/ezbench.d/gem_create.test | 8 | ||||
-rw-r--r-- | benchmarks/ezbench.d/gem_exec_ctx.test | 21 | ||||
-rw-r--r-- | benchmarks/ezbench.d/gem_exec_nop.test | 15 | ||||
-rw-r--r-- | benchmarks/ezbench.d/gem_exec_reloc.test | 20 | ||||
-rw-r--r-- | benchmarks/ezbench.d/gem_exec_trace.test | 19 | ||||
-rw-r--r-- | benchmarks/ezbench.d/gem_latency.test | 79 | ||||
-rw-r--r-- | benchmarks/ezbench.d/gem_mmap.test | 14 | ||||
-rw-r--r-- | benchmarks/ezbench.d/gem_prw.test | 20 | ||||
-rw-r--r-- | benchmarks/ezbench.d/gem_syslatency.test | 12 |
10 files changed, 242 insertions, 0 deletions
diff --git a/benchmarks/ezbench.d/gem_blt.test b/benchmarks/ezbench.d/gem_blt.test new file mode 100644 index 00000000..bd05031d --- /dev/null +++ b/benchmarks/ezbench.d/gem_blt.test @@ -0,0 +1,34 @@ +test_exec_time=2 + +[ -e $IGT_BENCHMARKS/gem_blt ] || return 1 +sudo -n true || return 1 + +while read size batch label; do + name="gem:blt:copy:${label}" + test_name="$test_name $name" + eval "${name}_run() { sudo $IGT_BENCHMARKS/gem_blt -r \$1 -s $size -b $batch; }" +done<<SIZES +4096 1 4KiBx1 +4096 16 4KiBx16 +4096 64 4KiBx64 +4096 256 4KiBx256 +4096 1024 4KiBx1024 +131072 1 128KiBx1 +131072 16 128KiBx16 +131072 64 128KiBx64 +131072 256 128KiBx256 +131072 1024 128KiBx1024 +4194304 1 4MiBx1 +4194304 32 4MiBx32 +4194304 1024 4MiBx1024 +SIZES + +while read size label; do + name="gem:blt:copy:${label}:sync" + test_name="$test_name $name" + eval "${name}_run() { sudo $IGT_BENCHMARKS/gem_blt -S -r \$1 -s $size -b 1 ; }" +done<<SIZES +4096 4KiB +131072 128KiB +4194304 4MiB +SIZES diff --git a/benchmarks/ezbench.d/gem_create.test b/benchmarks/ezbench.d/gem_create.test new file mode 100644 index 00000000..cd296fb6 --- /dev/null +++ b/benchmarks/ezbench.d/gem_create.test @@ -0,0 +1,8 @@ +test_exec_time=2 + +[ -e $IGT_BENCHMARKS/gem_create ] || return 1 +sudo -n true || return 1 + +test_name="gem:create:4k gem:create:4M" +gem:create:4k_run() { sudo $IGT_BENCHMARKS/gem_create -s 4096 -r $1; } +gem:create:4M_run() { sudo $IGT_BENCHMARKS/gem_create -s 4194304 -r $1; } diff --git a/benchmarks/ezbench.d/gem_exec_ctx.test b/benchmarks/ezbench.d/gem_exec_ctx.test new file mode 100644 index 00000000..85b2a5ab --- /dev/null +++ b/benchmarks/ezbench.d/gem_exec_ctx.test @@ -0,0 +1,21 @@ +# This outputs a graph of time(N), the us it takes to execute N empty batches +# performing the associated context operation each time. +# e.g. 110 59 34 22 16 13 11 10 10 10 9 4 1.4 1.4 1.2 0.9 0.8 +# As a summary, print the number of nop/s (so that it matches the bigger is +# better motif of fps). + +[ -e $IGT_BENCHMARKS/gem_exec_ctx ] || return 1 +sudo -n true || return 1 + +for i in nop default switch create; do + name="gem:exec:ctx:$i:single" + test_name="$test_name $name" + eval "${name}_run() { sudo $IGT_BENCHMARKS/gem_exec_ctx -s -b $i -r \$1 ; }" + + name="gem:exec:ctx:$i:continuous" + test_name="$test_name $name" + eval "${name}_run() { sudo $IGT_BENCHMARKS/gem_exec_ctx -b $i -r \$1 ; }" +done + +test_exec_time=3 +test_invert=1 diff --git a/benchmarks/ezbench.d/gem_exec_nop.test b/benchmarks/ezbench.d/gem_exec_nop.test new file mode 100644 index 00000000..ca9cc317 --- /dev/null +++ b/benchmarks/ezbench.d/gem_exec_nop.test @@ -0,0 +1,15 @@ +[ -e $IGT_BENCHMARKS/gem_exec_nop ] || return 1 +sudo -n true || return 1 + +for ring in rcs bcs vcs vecs all; do + name="gem:exec:nop:$ring:single" + test_name="$test_name $name" + eval "${name}_run() { sudo $IGT_BENCHMARKS/gem_exec_nop -s -e $ring -r \$1 ; }" + + name="gem:exec:nop:$ring:continuous" + test_name="$test_name $name" + eval "${name}_run() { sudo $IGT_BENCHMARKS/gem_exec_nop -e $ring -r \$1 ; }" +done + +test_exec_time=3 +test_invert=1 diff --git a/benchmarks/ezbench.d/gem_exec_reloc.test b/benchmarks/ezbench.d/gem_exec_reloc.test new file mode 100644 index 00000000..ccac6c1a --- /dev/null +++ b/benchmarks/ezbench.d/gem_exec_reloc.test @@ -0,0 +1,20 @@ +test_exec_time=18 +test_invert=1 + +[ -e $IGT_BENCHMARKS/gem_exec_reloc ] || return 1 +sudo -n true || return 1 + +for i in old lut; do + for j in busy cyclic fault skip none; do + for k in constant sequential reverse random; do + for b in 2 4096; do + test_name="$test_name gem:exec:reloc:$i:$j:$k:$b" + eval "gem:exec:reloc:${i}:${j}:${k}:${b}_run() { sudo $IGT_BENCHMARKS/gem_exec_reloc -s 65536 -m $i -e $j -o $k -l \$1 -b $b -r 4096 ; } " + done + done + done + for j in 0 32 1024 32768; do + test_name="$test_name gem:exec:reloc:$i:0:$j" + eval "gem:exec:reloc:${i}:0:${j}_run() { sudo $IGT_BENCHMARKS/gem_exec_reloc -s 4096 -m $i -e none -o constant -l \$1 -b $j -r 0 ; } " + done +done diff --git a/benchmarks/ezbench.d/gem_exec_trace.test b/benchmarks/ezbench.d/gem_exec_trace.test new file mode 100644 index 00000000..7bde22b5 --- /dev/null +++ b/benchmarks/ezbench.d/gem_exec_trace.test @@ -0,0 +1,19 @@ +[ -e $IGT_BENCHMARKS/gem_exec_trace ] || return 1 +sudo -n true || return 1 + +function __trace__ { + sudo $IGT_BENCHMARKS/gem_exec_trace $IGT_TRACES/$2.gem_exec_trace >/dev/null + for (( c=0; c<$1; c++ )); do + sudo $IGT_BENCHMARKS/gem_exec_trace $IGT_TRACES/$2.gem_exec_trace | sed 's/.*: //' + done +} + +for i in $IGT_TRACES/*.gem_exec_trace; do + trace=$(basename $i .gem_exec_trace) + name=gem:exec:trace:$trace + test_name="$test_name $name" + eval "${name}_run() { __trace__ \$1 $trace; }" +done + +test_exec_time=4 +test_invert=1 diff --git a/benchmarks/ezbench.d/gem_latency.test b/benchmarks/ezbench.d/gem_latency.test new file mode 100644 index 00000000..de2a6505 --- /dev/null +++ b/benchmarks/ezbench.d/gem_latency.test @@ -0,0 +1,79 @@ +test_exec_time=2 +test_invert=1 + +[ -e $IGT_BENCHMARKS/gem_latency ] || return 1 +sudo -n true || return 1 + +__gem:dispatch__() { + for (( c=0; c<$1; c++ )); do + sudo $IGT_BENCHMARKS/gem_latency -t 2 -n $2 -p $3 -f 1 $4 + done +} + +# Measure the delay to execute N nops +for n in 0 1 2 4 8 16 32 64 128 256 512 1024; do + name="gem:exec:latency:$n" + test_name="$test_name $name" + eval "${name}_run() { __gem:dispatch__ \$1 $n 1 ; } " +done + +for n in 0 1 2 4 8 16 32 64 128 256 512 1024; do + name="gem:parser:latency:$n" + test_name="$test_name $name" + eval "${name}_run() { __gem:dispatch__ \$1 $n 1 -C ; } " +done + +# Measure the execution delay vs contention, just for fun +for p in 1 2 4 8 16 32 64 128 256 512 1024; do + name="gem:latency:dispatch:$p" + test_name="$test_name $name" + eval "${name}_run() { __gem:dispatch__ \$1 0 $p ; } " +done + +# Measure the wakeup delay (each wakeup should be uncontended) +__gem:latency:wait__() { + for (( c=0; c<$1; c++ )); do + sudo $IGT_BENCHMARKS/gem_latency -t 2 -w 2 -p $2 -f 2 + done +} +for p in 1 2 4 8 16 32 64 128 256 512 1024; do + name="gem:latency:wait:$p" + test_name="$test_name $name" + eval "${name}_run() { __gem:latency:wait__ \$1 $p ; } " +done + +# Measure the total CPU cycles for the uncontended wakeups +__gem:latency:cpu__() { + for (( c=0; c<$1; c++ )); do + sudo $IGT_BENCHMARKS/gem_latency -t 2 -w 2 -p $2 -f 4 + done +} +for p in 1 2 4 8 16 32 64 128 512 1024; do + name="gem:latency:cpu:$p" + test_name="$test_name $name" + eval "${name}_run() { __gem:latency:cpu__ \$1 $p ; } " +done + +# Measure the wakeup delay for contended wakeups (multiple waiters per request) +__gem:latency:herd__() { + for (( c=0; c<$1; c++ )); do + sudo $IGT_BENCHMARKS/gem_latency -t 2 -w 1 -c $2 -f 2 + done +} +for p in 0 1 2 4 8 16 32 64 128 512 1024; do + name="gem:latency:herd:$p" + test_name="$test_name $name" + eval "${name}_run() { __gem:latency:herd__ \$1 $p ; } " +done + +# Measure the impact of contended wakeups on the RealTime waiter +__gem:latency:realtime__() { + for (( c=0; c<$1; c++ )); do + sudo $IGT_BENCHMARKS/gem_latency -t 2 -w 1 -c $2 -R -f 3 + done +} +for p in 0 1 2 4 8 16 32 64 128 512 1024; do + name="gem:latency:realtime:$p" + test_name="$test_name $name" + eval "${name}_run() { __gem:latency:realtime__ \$1 $p ; } " +done diff --git a/benchmarks/ezbench.d/gem_mmap.test b/benchmarks/ezbench.d/gem_mmap.test new file mode 100644 index 00000000..8d0d4788 --- /dev/null +++ b/benchmarks/ezbench.d/gem_mmap.test @@ -0,0 +1,14 @@ +[ -e $IGT_BENCHMARKS/gem_mmap ] || return 1 +sudo -n true || return 1 + +for i in cpu gtt wc; do + for j in fault clear write read; do + for k in none x y; do + test_name="$test_name gem:mmap:$i:$j:$k" + eval "gem:mmap:${i}:${j}:${k}_run() { sudo $IGT_BENCHMARKS/gem_mmap -m $i -d $j -t $k -r \$1 ; } " + + done + done +done + +test_exec_time=2 diff --git a/benchmarks/ezbench.d/gem_prw.test b/benchmarks/ezbench.d/gem_prw.test new file mode 100644 index 00000000..a2f49398 --- /dev/null +++ b/benchmarks/ezbench.d/gem_prw.test @@ -0,0 +1,20 @@ +# This outputs a graph of time(N), the time it takes to write 1<<N bytes in us. +# e.g. 0 1 2 4 8 16 32 +# The last value is for 4M, convert that to MiB/s for comparison +# +# Ideally we want to run this per ring, +# gem_exec_nop:rcs, gem_exec_nop:bcs, gem_exec_nop:vcs +# though for the time being just one will suffice + +[ -e $IGT_BENCHMARKS/gem_prw ] || return 1 +sudo -n true || return 1 + +for j in read write; do + for i in cpu gtt; do + test_name="$test_name gem:p$j:$i" + eval "gem:p$j:${i}_run() { sudo $IGT_BENCHMARKS/gem_prw -D $j -d $i -r \$1 ; }" + eval "gem:p$j:${i}_process() { bc -l <<< \" 4*1000000 / \${@: -1} \" ; }" + done +done + +test_exec_time=1 diff --git a/benchmarks/ezbench.d/gem_syslatency.test b/benchmarks/ezbench.d/gem_syslatency.test new file mode 100644 index 00000000..57a6c5c8 --- /dev/null +++ b/benchmarks/ezbench.d/gem_syslatency.test @@ -0,0 +1,12 @@ +test_name="gem:sys:latency" +test_exec_time=10 +test_invert=1 + +[ -e $IGT_BENCHMARKS/gem_syslatency ] || return 1 +sudo -n true || return 1 + +gem:sys:latency_run() { + for (( c=0; c<$1; c++ )); do + sudo $IGT_BENCHMARKS/gem_syslatency -f 1 + done +} |