summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Bakita <jbakita@cs.unc.edu>2020-10-20 18:20:39 -0400
committerJoshua Bakita <jbakita@cs.unc.edu>2020-10-20 18:23:06 -0400
commitec0512af6bbb8ba05eb13fc1aac7754283dd13aa (patch)
tree17b31bba227776734555f9dde3ad17aa39aa54f4
parentdd606a16e840880e7617b140f6083af8ea83b6b7 (diff)
Unify unpaired timing scripts for DIS, TACLe, and SD-VBS
Now supports specifying an input generation command for each benchmark - see dis/dis2MbInNames.txt for an example.
-rwxr-xr-xdis/bin/field_2mb2
-rwxr-xr-xdis/bin/matrix_2mb2
-rwxr-xr-xdis/bin/neighborhood_2mb2
-rwxr-xr-xdis/bin/pointer_2mb2
-rwxr-xr-xdis/bin/transitive_2mb2
-rwxr-xr-xdis/bin/update_2mb2
-rw-r--r--dis/dis2MbInNames.txt6
-rwxr-xr-xdis/run_dis.sh92
-rwxr-xr-xrun_all_dis.sh70
-rwxr-xr-xrun_bench.sh181
-rwxr-xr-xrun_dis_cache_vs_wss.sh69
-rwxr-xr-xrun_tacle_all.sh (renamed from run_tacle_rtss20.sh)7
12 files changed, 217 insertions, 220 deletions
diff --git a/dis/bin/field_2mb b/dis/bin/field_2mb
deleted file mode 100755
index 31f2a8d..0000000
--- a/dis/bin/field_2mb
+++ /dev/null
@@ -1,2 +0,0 @@
1#!/bin/bash
2taskset -c 0 ./gen_input.py field inputs/Field/in0 2097152 | ./field $@
diff --git a/dis/bin/matrix_2mb b/dis/bin/matrix_2mb
deleted file mode 100755
index 72710ab..0000000
--- a/dis/bin/matrix_2mb
+++ /dev/null
@@ -1,2 +0,0 @@
1#!/bin/bash
2taskset -c 0 ./gen_input.py matrix inputs/Matrix/in4 2097152 | ./matrix $@ > /dev/null
diff --git a/dis/bin/neighborhood_2mb b/dis/bin/neighborhood_2mb
deleted file mode 100755
index 226bd98..0000000
--- a/dis/bin/neighborhood_2mb
+++ /dev/null
@@ -1,2 +0,0 @@
1#!/bin/bash
2taskset -c 0 ./gen_input.py neighborhood inputs/Neighborhood/in0 2097152 | ./neighborhood $@ > /dev/null
diff --git a/dis/bin/pointer_2mb b/dis/bin/pointer_2mb
deleted file mode 100755
index 3ce8f2b..0000000
--- a/dis/bin/pointer_2mb
+++ /dev/null
@@ -1,2 +0,0 @@
1#!/bin/bash
2taskset -c 0 ./gen_input.py pointer inputs/Pointer/in0 2097152 | ./pointer $@
diff --git a/dis/bin/transitive_2mb b/dis/bin/transitive_2mb
deleted file mode 100755
index b8bcf5a..0000000
--- a/dis/bin/transitive_2mb
+++ /dev/null
@@ -1,2 +0,0 @@
1#!/bin/bash
2taskset -c 0 ./gen_input.py transitive inputs/Transitive/in0 2097152 | ./transitive $@
diff --git a/dis/bin/update_2mb b/dis/bin/update_2mb
deleted file mode 100755
index 3bc33f4..0000000
--- a/dis/bin/update_2mb
+++ /dev/null
@@ -1,2 +0,0 @@
1#!/bin/bash
2taskset -c 0 ./gen_input.py update inputs/Update/in0 2097152 | ./update $@
diff --git a/dis/dis2MbInNames.txt b/dis/dis2MbInNames.txt
new file mode 100644
index 0000000..00e6a22
--- /dev/null
+++ b/dis/dis2MbInNames.txt
@@ -0,0 +1,6 @@
1field ./gen_input.py field inputs/Field/in0 2097152
2matrix ./gen_input.py matrix inputs/Matrix/in0 2097152
3neighborhood ./gen_input.py neighborhood inputs/Neighborhood/in0 2097152
4pointer ./gen_input.py pointer inputs/Pointer/in0 2097152
5transitive ./gen_input.py transitive inputs/Transitive/in0 2097152
6update ./gen_input.py update inputs/Update/in0 2097152
diff --git a/dis/run_dis.sh b/dis/run_dis.sh
deleted file mode 100755
index 78745ec..0000000
--- a/dis/run_dis.sh
+++ /dev/null
@@ -1,92 +0,0 @@
1#!/bin/bash
2
3core=$1
4maxJobs=$2
5runID=$3
6benchmark=${4,}
7template_input=inputs/$4/in0
8wss_settings=inputs/WSSS
9cache_settings=inputs/caches
10
11if [ $# -lt 4 ]; then
12 echo "Usage $0 <core ID> <number of iterations> <run ID> <benchmark> [template input] [DIS WSS file] [DIS cache file]"
13 exit
14fi
15
16if [ $# -gt 4 ]; then
17 echo "Using alternate input template from $5"
18 template_input=$5
19fi
20
21if [ $# -gt 5 ]; then
22 echo "Using alternate WSS settings from $6"
23 wss_settings=$6
24fi
25
26if [ $# -gt 6 ]; then
27 echo "Using alternate cache settings from $7"
28 cache_settings=$7
29fi
30
31echo "Making sure that binary is up to date..."
32make $benchmark
33echo "Done. Disabling real-time throttling..."
34
35# Turn off rt throttling
36echo -1 > /proc/sys/kernel/sched_rt_runtime_us
37echo "Done. Redirecting all interrupts to core 0..."
38
39# Redirect all interrupts to core 0
40i=0
41for IRQ in /proc/irq/*
42do
43 # Skip default_smp_affinity
44 if [ -d $IRQ ]; then
45 irqList[$i]=$(cat $IRQ/smp_affinity_list)
46 echo 0 2> /dev/null > $IRQ/smp_affinity_list
47 fi
48 i=$(( $i + 1 ))
49done
50
51echo "Done. Checking for wbinvd module..."
52if [[ ! -f "/proc/wbinvd" ]]; then
53 echo "ERROR: wbinvd module not loaded. Exiting..."
54 exit
55fi
56
57# Enable L3 isolation
58echo "Done. Enabling L3 isolation..."
59mount -t resctrl resctrl /sys/fs/resctrl
60mkdir -p /sys/fs/resctrl/benchmarks
61echo $1 > /sys/fs/resctrl/benchmarks/cpus_list
62# Reset global bandwith control and remove L3 from global
63echo "L3:0=ffff;1=ffff;2=ffff;3=0000" > /sys/fs/resctrl/schemata
64echo "MB:0=2048;1=2048;2=2048;3=2048" > /sys/fs/resctrl/schemata
65# Alloc L3 to benchmark
66echo "L3:0=0000;1=0000;2=0000;3=ffff" > /sys/fs/resctrl/benchmarks/schemata
67echo "MB:0=2048;1=2048;2=2048;3=2048" > /sys/fs/resctrl/benchmarks/schemata
68echo "Done. Beginning benchmarks..."
69
70# Execute the benchmark for each WSS and cache config
71while read j; do
72 echo $j > /sys/fs/resctrl/benchmarks/schemata
73 while read i; do
74 if grep -q "#define LITMUS 1" ../baseline/source/extra.h; then
75 echo "Using LITMUS-RT!"
76 ./gen_input.py $benchmark $template_input $i | numactl -m 0 ./$benchmark $benchmark-$i-$j $maxJobs $core $runID 1
77 else
78 ./gen_input.py $benchmark $template_input $i | chrt -r 97 numactl -m 0 taskset -c $core ./$benchmark $benchmark-$i-$j $maxJobs $core $runID 1
79 fi
80 done < $wss_settings
81done < $cache_settings
82
83# Put IRQs back as they were
84i=0
85for IRQ in /proc/irq/*
86do
87 if [ -d $IRQ ]; then
88 echo ${irqList[$i]} 2> /dev/null > $IRQ/smp_affinity_list
89 fi
90 i=$(( $i + 1 ))
91done
92
diff --git a/run_all_dis.sh b/run_all_dis.sh
deleted file mode 100755
index 5a6b6e1..0000000
--- a/run_all_dis.sh
+++ /dev/null
@@ -1,70 +0,0 @@
1#!/bin/bash
2# Run baselines for all the DIS tasks
3if [ "$EUID" -ne 0 ]
4then
5 echo "You need to be root to enable cache way and interrupt isolation!"
6 exit
7fi
8
9if uname -a | grep -q "mc2"; then
10 echo "MC^2 detected! Cache isolation will be enabled"
11 iso="i"
12else
13 echo "MC^2 not detected."
14 iso="xi"
15fi
16
17datestring=$(date +"%b%d-%H")
18if ! grep -q irqaffinity /proc/cmdline; then
19 /playpen/move_interrupts_off_core15.sh
20else
21 echo "performance" > /sys/devices/system/cpu/cpu15/cpufreq/scaling_governor
22fi
23WSSS=WSSS_maxstride2mb
24caches=caches_all
25# Consider re-enabling this only if you're interested in exploring bandwidth effects
26#./setup_mem_and_global.sh
27if [[ $1 == "--contend" ]]; then
28 echo "Will run 6 contending tasks"
29 echo "Files will be named $datestring-<benchmark name>-c-"$iso".txt"
30 echo "Please verify the above settings. Press enter to continue..."
31 read
32 # Run two contending tasks on each other CCX
33 taskset -c 1 /playpen/mc2/imx6q-thrasher/thrasher &
34 taskset -c 2 /playpen/mc2/imx6q-thrasher/thrasher &
35 taskset -c 5 /playpen/mc2/imx6q-thrasher/thrasher &
36 taskset -c 6 /playpen/mc2/imx6q-thrasher/thrasher &
37 taskset -c 9 /playpen/mc2/imx6q-thrasher/thrasher &
38 taskset -c 10 /playpen/mc2/imx6q-thrasher/thrasher &
39 ./run_dis.sh 15 10 $datestring-field-c-$iso Field inputs/Field/in0 inputs/$WSSS inputs/$caches
40 ./postproc.sh $datestring-field-c-$iso
41 ./run_dis.sh 15 10 $datestring-matrix-c-$iso Matrix inputs/Matrix/in0 inputs/$WSSS inputs/$caches
42 ./postproc.sh $datestring-matrix-c-$iso
43 ./run_dis.sh 15 10 $datestring-neighborhood-c-$iso Neighborhood inputs/Neighborhood/in0 inputs/$WSSS inputs/$caches
44 ./postproc.sh $datestring-neighborhood-c-$iso
45 ./run_dis.sh 15 10 $datestring-pointer-c-$iso Pointer inputs/Pointer/in0 inputs/$WSSS inputs/$caches
46 ./postproc.sh $datestring-pointer-c-$iso
47 ./run_dis.sh 15 10 $datestring-transitive-c-$iso Transitive inputs/Transitive/in0 inputs/$WSSS inputs/$caches
48 ./postproc.sh $datestring-transitive-c-$iso
49 ./run_dis.sh 15 10 $datestring-update-c-$iso Update inputs/Update/in0 inputs/$WSSS inputs/$caches
50 ./postproc.sh $datestring-update-c-$iso
51 killall thrasher
52else
53 echo "Will run no contending tasks (use --contend for contending tasks)"
54 echo "Files will be named $datestring-<benchmark name>-xc-"$iso".txt"
55 echo "Please verify the above settings. Press enter to continue..."
56 read
57 killall thrasher
58 ./run_dis.sh 15 10 $datestring-field-xc-$iso Field inputs/Field/in0 inputs/$WSSS inputs/$caches
59 ./postproc.sh $datestring-field-xc-$iso
60 ./run_dis.sh 15 10 $datestring-matrix-xc-$iso Matrix inputs/Matrix/in0 inputs/$WSSS inputs/$caches
61 ./postproc.sh $datestring-matrix-xc-$iso
62 ./run_dis.sh 15 10 $datestring-neighborhood-xc-$iso Neighborhood inputs/Neighborhood/in0 inputs/$WSSS inputs/$caches
63 ./postproc.sh $datestring-neighborhood-xc-$iso
64 ./run_dis.sh 15 10 $datestring-pointer-xc-$iso Pointer inputs/Pointer/in0 inputs/$WSSS inputs/$caches
65 ./postproc.sh $datestring-pointer-xc-$iso
66 ./run_dis.sh 15 10 $datestring-transitive-xc-$iso Transitive inputs/Transitive/in0 inputs/$WSSS inputs/$caches
67 ./postproc.sh $datestring-transitive-xc-$iso
68 ./run_dis.sh 15 10 $datestring-update-xc-$iso Update inputs/Update/in0 inputs/$WSSS inputs/$caches
69 ./postproc.sh $datestring-update-xc-$iso <