diff options
-rwxr-xr-x | dis/bin/field_2mb | 2 | ||||
-rwxr-xr-x | dis/bin/matrix_2mb | 2 | ||||
-rwxr-xr-x | dis/bin/neighborhood_2mb | 2 | ||||
-rwxr-xr-x | dis/bin/pointer_2mb | 2 | ||||
-rwxr-xr-x | dis/bin/transitive_2mb | 2 | ||||
-rwxr-xr-x | dis/bin/update_2mb | 2 | ||||
-rw-r--r-- | dis/dis2MbInNames.txt | 6 | ||||
-rwxr-xr-x | dis/run_dis.sh | 92 | ||||
-rwxr-xr-x | run_all_dis.sh | 70 | ||||
-rwxr-xr-x | run_bench.sh | 181 | ||||
-rwxr-xr-x | run_dis_cache_vs_wss.sh | 69 | ||||
-rwxr-xr-x | run_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 | ||
2 | taskset -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 | ||
2 | taskset -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 | ||
2 | taskset -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 | ||
2 | taskset -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 | ||
2 | taskset -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 | ||
2 | taskset -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 @@ | |||
1 | field ./gen_input.py field inputs/Field/in0 2097152 | ||
2 | matrix ./gen_input.py matrix inputs/Matrix/in0 2097152 | ||
3 | neighborhood ./gen_input.py neighborhood inputs/Neighborhood/in0 2097152 | ||
4 | pointer ./gen_input.py pointer inputs/Pointer/in0 2097152 | ||
5 | transitive ./gen_input.py transitive inputs/Transitive/in0 2097152 | ||
6 | update ./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 | |||
3 | core=$1 | ||
4 | maxJobs=$2 | ||
5 | runID=$3 | ||
6 | benchmark=${4,} | ||
7 | template_input=inputs/$4/in0 | ||
8 | wss_settings=inputs/WSSS | ||
9 | cache_settings=inputs/caches | ||
10 | |||
11 | if [ $# -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 | ||
14 | fi | ||
15 | |||
16 | if [ $# -gt 4 ]; then | ||
17 | echo "Using alternate input template from $5" | ||
18 | template_input=$5 | ||
19 | fi | ||
20 | |||
21 | if [ $# -gt 5 ]; then | ||
22 | echo "Using alternate WSS settings from $6" | ||
23 | wss_settings=$6 | ||
24 | fi | ||
25 | |||
26 | if [ $# -gt 6 ]; then | ||
27 | echo "Using alternate cache settings from $7" | ||
28 | cache_settings=$7 | ||
29 | fi | ||
30 | |||
31 | echo "Making sure that binary is up to date..." | ||
32 | make $benchmark | ||
33 | echo "Done. Disabling real-time throttling..." | ||
34 | |||
35 | # Turn off rt throttling | ||
36 | echo -1 > /proc/sys/kernel/sched_rt_runtime_us | ||
37 | echo "Done. Redirecting all interrupts to core 0..." | ||
38 | |||
39 | # Redirect all interrupts to core 0 | ||
40 | i=0 | ||
41 | for IRQ in /proc/irq/* | ||
42 | do | ||
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 )) | ||
49 | done | ||
50 | |||
51 | echo "Done. Checking for wbinvd module..." | ||
52 | if [[ ! -f "/proc/wbinvd" ]]; then | ||
53 | echo "ERROR: wbinvd module not loaded. Exiting..." | ||
54 | exit | ||
55 | fi | ||
56 | |||
57 | # Enable L3 isolation | ||
58 | echo "Done. Enabling L3 isolation..." | ||
59 | mount -t resctrl resctrl /sys/fs/resctrl | ||
60 | mkdir -p /sys/fs/resctrl/benchmarks | ||
61 | echo $1 > /sys/fs/resctrl/benchmarks/cpus_list | ||
62 | # Reset global bandwith control and remove L3 from global | ||
63 | echo "L3:0=ffff;1=ffff;2=ffff;3=0000" > /sys/fs/resctrl/schemata | ||
64 | echo "MB:0=2048;1=2048;2=2048;3=2048" > /sys/fs/resctrl/schemata | ||
65 | # Alloc L3 to benchmark | ||
66 | echo "L3:0=0000;1=0000;2=0000;3=ffff" > /sys/fs/resctrl/benchmarks/schemata | ||
67 | echo "MB:0=2048;1=2048;2=2048;3=2048" > /sys/fs/resctrl/benchmarks/schemata | ||
68 | echo "Done. Beginning benchmarks..." | ||
69 | |||
70 | # Execute the benchmark for each WSS and cache config | ||
71 | while 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 | ||
81 | done < $cache_settings | ||
82 | |||
83 | # Put IRQs back as they were | ||
84 | i=0 | ||
85 | for IRQ in /proc/irq/* | ||
86 | do | ||
87 | if [ -d $IRQ ]; then | ||
88 | echo ${irqList[$i]} 2> /dev/null > $IRQ/smp_affinity_list | ||
89 | fi | ||
90 | i=$(( $i + 1 )) | ||
91 | done | ||
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 | ||
3 | if [ "$EUID" -ne 0 ] | ||
4 | then | ||
5 | echo "You need to be root to enable cache way and interrupt isolation!" | ||
6 | exit | ||
7 | fi | ||
8 | |||
9 | if uname -a | grep -q "mc2"; then | ||
10 | echo "MC^2 detected! Cache isolation will be enabled" | ||
11 | iso="i" | ||
12 | else | ||
13 | echo "MC^2 not detected." | ||
14 | iso="xi" | ||
15 | fi | ||
16 | |||
17 | datestring=$(date +"%b%d-%H") | ||
18 | if ! grep -q irqaffinity /proc/cmdline; then | ||
19 | /playpen/move_interrupts_off_core15.sh | ||
20 | else | ||
21 | echo "performance" > /sys/devices/system/cpu/cpu15/cpufreq/scaling_governor | ||
22 | fi | ||
23 | WSSS=WSSS_maxstride2mb | ||
24 | caches=caches_all | ||
25 | # Consider re-enabling this only if you're interested in exploring bandwidth effects | ||
26 | #./setup_mem_and_global.sh | ||
27 | if [[ $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 | ||
52 | else | ||
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 | ||
70 | fi | ||
diff --git a/run_bench.sh b/run_bench.sh index c5b67b6..4e09faa 100755 --- a/run_bench.sh +++ b/run_bench.sh | |||
@@ -1,30 +1,110 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | core=$1 | 3 | if [ $# -lt 5 ]; then |
4 | maxJobs=$2 | 4 | echo "Usage $0 -m MODE -p CPU -l LOOPS -b FILE [-c] RUN_ID" |
5 | userRunID=$3 | 5 | echo " -m base|dis Which benchmarking mode to use" |
6 | tacleNames=tacleNames.txt | 6 | echo " -p CPU Which CPU to run each benchmark on" |
7 | echo " -l LOOPS How many loops of each benchmark to do" | ||
8 | echo " -b FILE List of benchmarks to execute. Optional tab-" | ||
9 | echo " delimited 2nd column specifies an input" | ||
10 | echo " generation command (fed to bench via stdin)" | ||
11 | echo " -B Enable background contenders on other CCXes" | ||
12 | echo "Mode base requires no additional options." | ||
13 | echo "Mode dis does not support the 2nd col. of -b and needs:" | ||
14 | echo " -W FILE List of working set sizes to pass gen_input.py" | ||
15 | echo " -T FILE Input template to pass to gen_input.py" | ||
16 | echo " -C FILE List of cache configurations to test" | ||
17 | exit | ||
18 | fi | ||
7 | 19 | ||
8 | if [ $# -lt 3 ]; then | 20 | # Name options similarly to rtspin |
9 | echo "Usage $0 <core ID> <number of iterations> <run ID> [TACLe names file] [--contend]" | 21 | while getopts “m:p:l:b:BW:T:C:” opt; do |
22 | case $opt in | ||
23 | # Required | ||
24 | m) mode=$OPTARG ;; | ||
25 | p) core=$OPTARG ;; | ||
26 | l) maxJobs=$OPTARG ;; | ||
27 | b) benchNames=$OPTARG ;; | ||
28 | # Optional | ||
29 | B) contend=1 ;; | ||
30 | W) wss_settings=$OPTARG ;; | ||
31 | T) template_input=$OPTARG ;; | ||
32 | C) cache_settings=$OPTARG ;; | ||
33 | esac | ||
34 | done | ||
35 | # Reset to read operands | ||
36 | shift $((OPTIND -1)) | ||
37 | userRunID=$1 | ||
38 | |||
39 | # Required argument checking | ||
40 | if [[ "$mode" != "base" ]] && [[ "$mode" != "dis" ]]; then | ||
41 | echo "Invalid argument: MODE must be either 'base' or 'dis'" | ||
42 | exit | ||
43 | fi | ||
44 | if [[ ! -v core ]] || [[ ! -v maxJobs ]] || [[ ! -v benchNames ]]; then | ||
45 | echo "Missing argument: -p, -l, and -b are required" | ||
46 | exit | ||
47 | fi | ||
48 | if [[ ! -f "$benchNames" ]]; then | ||
49 | echo "Invalid argument: $benchNames des not exist" | ||
50 | exit | ||
51 | fi | ||
52 | if [[ ! -v userRunID ]]; then | ||
53 | echo "Missing argument: RUN_ID is required" | ||
10 | exit | 54 | exit |
11 | fi | 55 | fi |
12 | 56 | ||
13 | if [ $# -gt 3 ]; then | 57 | # DIS argument checking |
14 | echo "Using alternate list of TACLe benchmarks from $4" | 58 | if [[ "$mode" == "dis" ]] && [[ ! -v wss_settings || ! -v template_input || -z $cache_settings ]]; then |
15 | tacleNames=$4 | 59 | echo "Missing argument: DIS needs -W FILE -T FILE and -C FILE" |
60 | exit | ||
61 | fi | ||
62 | if [[ "$mode" == "dis" ]] && [[ ! -f "$wss_settings" ]]; then | ||
63 | echo "Invalid argument: $wss_settings does not exist" | ||
64 | exit | ||
65 | fi | ||
66 | if [[ "$mode" == "dis" ]] && [[ ! -f "$template_input" ]]; then | ||
67 | echo "Invalid argument: $template_input does not exist" | ||
68 | exit | ||
69 | fi | ||
70 | if [[ "$mode" == "dis" ]] && [[ ! -f "$cache_settings" ]]; then | ||
71 | echo "Invalid argument: $cache_settings does not exist" | ||
72 | exit | ||
16 | fi | 73 | fi |
17 | 74 | ||
75 | # Check permissions and update state | ||
18 | if [ "$EUID" -ne 0 ] | 76 | if [ "$EUID" -ne 0 ] |
19 | then | 77 | then |
20 | echo "You need to be root to enable interrupt isolation and real-time execution!" | 78 | echo "You need to be root to enable interrupt isolation and real-time execution!" |
21 | exit | 79 | exit |
22 | fi | 80 | fi |
23 | 81 | ||
24 | echo "Making sure that binaries are up to date..." | 82 | echo "Done. Loading benchmark names and input..." |
83 | |||
84 | # Read the names of each benchmark and load input. | ||
85 | # This might look a bit scary, but all it does is | ||
86 | # separate the two fields (1 or more tabs in-between), | ||
87 | # save the benchmark name, and execute the input | ||
88 | # command (storing its output in-memory for later). | ||
89 | j=0 | ||
90 | IFS=$'\r\n' | ||
25 | while read i; do | 91 | while read i; do |
26 | make bin/$i | 92 | bench[$j]=$(echo $i | tr -s "\t" | cut -f1) |
27 | done < $tacleNames | 93 | input[$j]=$(eval $(echo $i | tr -s "\t" | cut -s -f2)) |
94 | j=$(( $j + 1 )) | ||
95 | done < $benchNames | ||
96 | echo "Making sure that binaries are up to date..." | ||
97 | |||
98 | for b in ${bench[@]}; do | ||
99 | make bin/$b | ||
100 | if [[ $? ]]; then | ||
101 | make $b | ||
102 | fi | ||
103 | if [[ ! -f $b && ! -f "./bin/$b" ]]; then | ||
104 | echo "Unable to find benchmark $b" | ||
105 | exit | ||
106 | fi | ||
107 | done | ||
28 | echo "Done. Disabling real-time throttling..." | 108 | echo "Done. Disabling real-time throttling..." |
29 | 109 | ||
30 | # Turn off rt throttling | 110 | # Turn off rt throttling |
@@ -43,28 +123,20 @@ do | |||
43 | i=$(( $i + 1 )) | 123 | i=$(( $i + 1 )) |
44 | done | 124 | done |
45 | 125 | ||
46 | # Read the names of each benchmark | ||
47 | j=0 | ||
48 | while read i; do | ||
49 | tacleProg[$j]=$i | ||
50 | j=$(( $j + 1 )) | ||
51 | done < $tacleNames | ||
52 | |||
53 | echo "Done. Checking for wbinvd module..." | 126 | echo "Done. Checking for wbinvd module..." |
54 | if [[ ! -f "/proc/wbinvd" ]]; then | 127 | if [[ ! -f "/proc/wbinvd" ]]; then |
55 | echo "ERROR: wbinvd module not loaded. Exiting..." | 128 | echo "ERROR: wbinvd module not loaded. Exiting..." |
56 | exit | 129 | exit |
57 | fi | 130 | fi |
58 | 131 | ||
59 | echo "Done. Setting cores $firstCore and $secondCore to 'performance'..." | 132 | echo "Done. Setting core $core to 'performance'..." |
60 | echo "performance" > /sys/devices/system/cpu/cpu15/cpufreq/scaling_governor | 133 | echo "performance" > /sys/devices/system/cpu/cpu$core/cpufreq/scaling_governor |
61 | echo "performance" > /sys/devices/system/cpu/cpu31/cpufreq/scaling_governo | ||
62 | 134 | ||
63 | # Enable L3 isolation | 135 | # Enable L3 isolation |
64 | echo "Done. Enabling L3 isolation..." | 136 | echo "Done. Enabling L3 isolation..." |
65 | mount -t resctrl resctrl /sys/fs/resctrl | 137 | mount -t resctrl resctrl /sys/fs/resctrl |
66 | mkdir -p /sys/fs/resctrl/benchmarks | 138 | mkdir -p /sys/fs/resctrl/benchmarks |
67 | echo $1 > /sys/fs/resctrl/benchmarks/cpus_list | 139 | echo $core > /sys/fs/resctrl/benchmarks/cpus_list |
68 | # Reset global bandwith control and remove L3 from global | 140 | # Reset global bandwith control and remove L3 from global |
69 | echo "L3:0=ffff;1=ffff;2=ffff;3=0000" > /sys/fs/resctrl/schemata | 141 | echo "L3:0=ffff;1=ffff;2=ffff;3=0000" > /sys/fs/resctrl/schemata |
70 | echo "MB:0=2048;1=2048;2=2048;3=2048" > /sys/fs/resctrl/schemata | 142 | echo "MB:0=2048;1=2048;2=2048;3=2048" > /sys/fs/resctrl/schemata |
@@ -80,9 +152,9 @@ runID=$(date +"%b%d-%H") | |||
80 | # Confirm configuration with user | 152 | # Confirm configuration with user |
81 | echo "=== Global Config ===" | 153 | echo "=== Global Config ===" |
82 | cat /sys/fs/resctrl/schemata | 154 | cat /sys/fs/resctrl/schemata |
83 | echo "=== Core $1 Config ===" | 155 | echo "=== Core $core Config ===" |
84 | cat /sys/fs/resctrl/benchmarks/schemata | 156 | cat /sys/fs/resctrl/benchmarks/schemata |
85 | if [[ $5 == "--contend" ]]; then | 157 | if [[ -v contend ]]; then |
86 | if [[ ! -f "/playpen/mc2/imx6q-thrasher/thrasher" ]]; then | 158 | if [[ ! -f "/playpen/mc2/imx6q-thrasher/thrasher" ]]; then |
87 | echo "ERROR: thrasher binary not fonud. Exiting..." | 159 | echo "ERROR: thrasher binary not fonud. Exiting..." |
88 | exit | 160 | exit |
@@ -99,15 +171,12 @@ else | |||
99 | echo "MC^2 not detected." | 171 | echo "MC^2 not detected." |
100 | runID=$runID-xi | 172 | runID=$runID-xi |
101 | fi | 173 | fi |
102 | if pwd | grep -qi dis; then | ||
103 | echo "Autodetected DIS. Will use script-level looping." | ||
104 | fi | ||
105 | echo "Results will be saved as $runID-$userRunID.txt" | 174 | echo "Results will be saved as $runID-$userRunID.txt" |
106 | echo "Press enter to confirm environment, Ctrl-C to exit..." | 175 | echo "Press enter to confirm environment, Ctrl-C to exit..." |
107 | read | 176 | read |
108 | 177 | ||
109 | # Start contending tasks | 178 | # Start contending tasks |
110 | if [[ $5 == "--contend" ]]; then | 179 | if [[ -v contend ]]; then |
111 | echo "Done. Starting 6 contending tasks..." | 180 | echo "Done. Starting 6 contending tasks..." |
112 | # Run two contending tasks on each other CCX | 181 | # Run two contending tasks on each other CCX |
113 | taskset -c 1 /playpen/mc2/imx6q-thrasher/thrasher & | 182 | taskset -c 1 /playpen/mc2/imx6q-thrasher/thrasher & |
@@ -120,27 +189,53 @@ fi | |||
120 | sleep 1 # Wait for contending tasks to start | 189 | sleep 1 # Wait for contending tasks to start |
121 | echo "Done. Beginning benchmarks..." | 190 | echo "Done. Beginning benchmarks..." |
122 | 191 | ||
123 | num_tests=$(wc -l < $tacleNames) | 192 | # Output coloring |
124 | for (( i = 0; i < $num_tests ; i++ )) | 193 | FAIL_COLOR="\033[0;31m" |
125 | do | 194 | GOOD_COLOR="\033[0;32m" |
126 | # If using DIS, we have to iterate in the script as DIS won't do it for us | 195 | RESET_COLOR="\033[0m" |
127 | pwd | grep -qi dis | 196 | |
128 | iters=$(python3 -c "print(int(not "$?")*("$maxJobs"-1))") | 197 | num_tests=$(wc -l < $benchNames) |
129 | for ((k=0;k<=iters;k++)); do | 198 | # For each benchmark |
199 | for (( i = 0; i < $num_tests ; i++ )); do | ||
200 | if [[ -f ${bench[$i]} ]]; then | ||
201 | binary="${bench[$i]}" | ||
202 | else | ||
203 | binary="./bin/${bench[$i]}" | ||
204 | fi | ||
205 | if [[ "$mode" == "base" ]]; then | ||
206 | # Just run the benchmark if TACLeBench | ||
130 | # Check if we're using LITMUS^RT or not | 207 | # Check if we're using LITMUS^RT or not |
131 | if [[ -f source/extra.h ]] && grep -q "#define LITMUS 1" source/extra.h; then | 208 | if grep -q "#define LITMUS 1" ../extra.h; then |
132 | ./bin/${tacleProg[$i]} ${tacleProg[$i]} $maxJobs $core $runID-$userRunID 1 | 209 | echo "Using LITMUS-RT!" |
210 | echo "${input[$i]}" | numactl -m 0 ./bin/$binary ${bench[$i]} $maxJobs $core $runID-$userRunID 1 | ||
133 | else | 211 | else |
134 | # Interleave memory allocations between all nodes (only 1 node w/out MC^2) | 212 | # Interleave memory allocations between all nodes (only 1 node w/out MC^2) |
135 | chrt -r 97 numactl --interleave=all taskset -c $core ./bin/${tacleProg[$i]} ${tacleProg[$i]} $maxJobs $core $runID-$userRunID 1 | 213 | # (this is right because we're testing a task w/out SMT, so it gets both colors) |
136 | #chrt -r 97 numactl -m 0 taskset -c $core ./bin/${tacleProg[$i]} ${tacleProg[$i]} $maxJobs $core $runID-$userRunID-NOINTERLEAVE 1 | 214 | echo "${input[$i]}" | chrt -r 97 numactl --interleave=all taskset -c $core ./$binary ${bench[$i]} $maxJobs $core $runID-$userRunID 1 |
137 | fi | 215 | fi |
138 | done | 216 | elif [[ "$mode" == "dis" ]]; then |
139 | echo COMPLETE: ${tacleProg[$i]} | 217 | # Loop through each WSS and cache config if DIS |
218 | while read j; do # For cache setting | ||
219 | echo $j > /sys/fs/resctrl/benchmarks/schemata | ||
220 | while read ii; do # For WSS setting | ||
221 | if grep -q "#define LITMUS 1" ../extra.h; then | ||
222 | echo "Using LITMUS-RT!" | ||
223 | ./gen_input.py ${bench[$i]} inputs/${bench[$i]^}/$template_input $ii | numactl -m 0 ./$binary $bench[$i]}-$ii-$j $maxJobs $core $runID 1 | ||
224 | else | ||
225 | ./gen_input.py ${bench[$i]} $template_input $ii | chrt -r 97 numactl -m 0 taskset -c $core ./$binary ${bench[$i]}-$ii-$j $maxJobs $core $runID 1 | ||
226 | fi | ||
227 | done < $wss_settings | ||
228 | done < $cache_settings | ||
229 | fi | ||
230 | if [[ $? != 0 ]]; then | ||
231 | echo -e ${FAIL_COLOR}FAILED${RESET_COLOR}: ${bench[$i]} | ||
232 | else | ||
233 | echo -e ${GOOD_COLOR}COMPLETE${RESET_COLOR}: ${bench[$i]} | ||
234 | fi | ||
140 | done | 235 | done |
141 | 236 | ||
142 | # End contending tasks | 237 | # End contending tasks |
143 | if [[ $5 == "--contend" ]]; then | 238 | if [[ -v contend ]]; then |
144 | killall thrasher | 239 | killall thrasher |
145 | fi | 240 | fi |
146 | 241 | ||
diff --git a/run_dis_cache_vs_wss.sh b/run_dis_cache_vs_wss.sh new file mode 100755 index 0000000..46a12ff --- /dev/null +++ b/run_dis_cache_vs_wss.sh | |||
@@ -0,0 +1,69 @@ | |||
1 | #!/bin/bash | ||
2 | # Run baselines for all the DIS tasks | ||
3 | if [ "$EUID" -ne 0 ] | ||
4 | then | ||
5 | echo "You need to be root to enable cache way and interrupt isolation!" | ||
6 | exit | ||
7 | fi | ||
8 | |||
9 | if uname -a | grep -q "mc2"; then | ||
10 | echo "MC^2 detected! Cache isolation will be enabled" | ||
11 | iso="i" | ||
12 | else | ||
13 | echo "MC^2 not detected." | ||
14 | iso="xi" | ||
15 | fi | ||
16 | |||
17 | cd dis | ||
18 | |||
19 | WSSS=WSSS_maxstride2mb | ||
20 | caches=caches_all | ||
21 | # Consider re-enabling this only if you're interested in exploring bandwidth effects | ||
22 | #./setup_mem_and_global.sh | ||
23 | if [[ $1 == "--contend" ]]; then | ||
24 | echo "Will run 6 contending tasks" | ||
25 | echo "Files will be named $datestring-<benchmark name>-10-c-"$iso".txt" | ||
26 | echo "Please verify the above settings. Press enter to continue..." | ||
27 | read | ||
28 | echo "field" > /tmp/disNames.txt | ||
29 | ../run_bench.sh -p 15 -B -l 10 -b /tmp/disNames.txt -W WSSS -C caches -T in0 field-10 | ||
30 | ./postproc.sh $datestring-field-10-c-$iso | ||
31 | echo "matrix" > /tmp/disNames.txt | ||
32 | ../run_bench.sh -p 15 -B -l 10 -b /tmp/disNames.txt -W WSSS -C caches -T in0 matrix-10 | ||
33 | ./postproc.sh $datestring-matrix-10-c-$iso | ||
34 | echo "neighborhood" > /tmp/disNames.txt | ||
35 | ../run_bench.sh -p 15 -B -l 10 -b /tmp/disNames.txt -W WSSS -C caches -T in0 neighborhood-10 | ||
36 | ./postproc.sh $datestring-neighborhood-10-c-$iso | ||
37 | echo "pointer" > /tmp/disNames.txt | ||
38 | ../run_bench.sh -p 15 -B -l 10 -b /tmp/disNames.txt -W WSSS -C caches -T in0 pointer-10 | ||
39 | ./postproc.sh $datestring-pointer-10-c-$iso | ||
40 | echo "transitive" > /tmp/disNames.txt | ||
41 | ../run_bench.sh -p 15 -B -l 10 -b /tmp/disNames.txt -W WSSS -C caches -T in0 transitive-10 | ||
42 | ./postproc.sh $datestring-transitive-10-c-$iso | ||
43 | echo "update" > /tmp/disNames.txt | ||
44 | ../run_bench.sh -p 15 -B -l 10 -b /tmp/disNames.txt -W WSSS -C caches -T in0 update-10 | ||
45 | ./postproc.sh $datestring-update-10-c-$iso | ||
46 | else | ||
47 | echo "Will run no contending tasks (use --contend for contending tasks)" | ||
48 | echo "Files will be named $datestring-<benchmark name>-10-xc-"$iso".txt" | ||
49 | echo "Please verify the above settings. Press enter to continue..." | ||
50 | read | ||
51 | echo "field" > /tmp/disNames.txt | ||
52 | ../run_bench.sh -p 15 -l 10 -b /tmp/disNames.txt -W WSSS -C caches -T in0 field-10 | ||
53 | ./postproc.sh $datestring-field-10-xc-$iso | ||
54 | echo "matrix" > /tmp/disNames.txt | ||
55 | ../run_bench.sh -p 15 -l 10 -b /tmp/disNames.txt -W WSSS -C caches -T in0 matrix-10 | ||
56 | ./postproc.sh $datestring-matrix-10-xc-$iso | ||
57 | echo "neighborhood" > /tmp/disNames.txt | ||
58 | ../run_bench.sh -p 15 -l 10 -b /tmp/disNames.txt -W WSSS -C caches -T in0 neighborhood-10 | ||
59 | ./postproc.sh $datestring-neighborhood-10-xc-$iso | ||
60 | echo "pointer" > /tmp/disNames.txt | ||
61 | ../run_bench.sh -p 15 -l 10 -b /tmp/disNames.txt -W WSSS -C caches -T in0 pointer-10 | ||
62 | ./postproc.sh $datestring-pointer-10-xc-$iso | ||
63 | echo "transitive" > /tmp/disNames.txt | ||
64 | ../run_bench.sh -p 15 -l 10 -b /tmp/disNames.txt -W WSSS -C caches -T in0 transitive-10 | ||
65 | ./postproc.sh $datestring-transitive-10-xc-$iso | ||
66 | echo "update" > /tmp/disNames.txt | ||
67 | ../run_bench.sh -p 15 -l 10 -b /tmp/disNames.txt -W WSSS -C caches -T in0 update-10 | ||
68 | ./postproc.sh $datestring-update-10-xc-$iso | ||
69 | fi | ||
diff --git a/run_tacle_rtss20.sh b/run_tacle_all.sh index 6770c55..dd5a443 100755 --- a/run_tacle_rtss20.sh +++ b/run_tacle_all.sh | |||
@@ -1,6 +1,7 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | # Copyright 2020 Joshua Bakita | 2 | # Copyright 2020 Joshua Bakita |
3 | # This script runs the baselines and Level-A/B and Level-C all_pairs for TACLe w/out MC^2 | 3 | # This script runs the baselines and Level-A/B and Level-C all_pairs |
4 | # for TACLe w/out MC^2 | ||
4 | 5 | ||
5 | if uname -a | grep -q mc2; then | 6 | if uname -a | grep -q mc2; then |
6 | echo "You need to run this without MC^2!" | 7 | echo "You need to run this without MC^2!" |
@@ -21,9 +22,9 @@ echo "performance" > /sys/devices/system/cpu/cpu31/cpufreq/scaling_governor | |||
21 | 22 | ||
22 | cd baseline | 23 | cd baseline |
23 | baseNo=baseline/$(date +"%b%d-%H")-xc-xi-1k.txt | 24 | baseNo=baseline/$(date +"%b%d-%H")-xc-xi-1k.txt |
24 | echo "" | ./run_baseline.sh 15 1001 1k ../all_pairs/tacleNames.txt | 25 | echo "" | ../run_bench.sh -m base -p 15 -l 1001 -b ../all_pairs/tacleNames.txt 1k |
25 | baseYes=baseline/$(date +"%b%d-%H")-c-xi-1k.txt | 26 | baseYes=baseline/$(date +"%b%d-%H")-c-xi-1k.txt |
26 | echo "" | ./run_baseline.sh 15 1001 1k ../all_pairs/tacleNames.txt --contend | 27 | echo "" | ../run_bench.sh -B -m make -p 15 -l 1001 -b ../all_pairs/tacleNames.txt 1k |
27 | 28 | ||
28 | cd ../all_pairs | 29 | cd ../all_pairs |
29 | pairsNo=all_pairs/$(date +"%b%d-%H")-xc-xi-1k | 30 | pairsNo=all_pairs/$(date +"%b%d-%H")-xc-xi-1k |