diff options
-rwxr-xr-x | all_pairs/run_all_pairs.sh | 107 | ||||
-rwxr-xr-x | all_pairs/run_all_pairs_L3_ONLY.sh | 170 | ||||
-rwxr-xr-x | baseline/run_baseline.sh | 108 | ||||
-rwxr-xr-x | baseline/run_baseline_L3_ONLY.sh | 152 | ||||
-rwxr-xr-x | run_tacle_rtss20.sh | 48 | ||||
-rwxr-xr-x | smt_analysis_rtss20/run_all_pairs_Level-C_TACLe.sh | 161 |
6 files changed, 727 insertions, 19 deletions
diff --git a/all_pairs/run_all_pairs.sh b/all_pairs/run_all_pairs.sh index d48f211..2260216 100755 --- a/all_pairs/run_all_pairs.sh +++ b/all_pairs/run_all_pairs.sh | |||
@@ -3,11 +3,11 @@ | |||
3 | firstCore=$1 | 3 | firstCore=$1 |
4 | secondCore=$2 | 4 | secondCore=$2 |
5 | maxJobs=$3 | 5 | maxJobs=$3 |
6 | runID=$4 | 6 | userRunID=$4 |
7 | tacleNames=tacleNames.txt | 7 | tacleNames=tacleNames.txt |
8 | 8 | ||
9 | if [ $# -lt 4 ]; then | 9 | if [ $# -lt 4 ]; then |
10 | echo "Usage $0 <first core ID> <second core ID> <number of iterations> <run ID> [TACLe names file]" | 10 | echo "Usage $0 <first core ID> <second core ID> <number of iterations> <run ID> [TACLe names file] [--contend]" |
11 | exit | 11 | exit |
12 | fi | 12 | fi |
13 | 13 | ||
@@ -16,6 +16,12 @@ if [ $# -gt 4 ]; then | |||
16 | tacleNames=$5 | 16 | tacleNames=$5 |
17 | fi | 17 | fi |
18 | 18 | ||
19 | if [ "$EUID" -ne 0 ] | ||
20 | then | ||
21 | echo "You need to be root to enable interrupt isolation and real-time execution!" | ||
22 | exit | ||
23 | fi | ||
24 | |||
19 | echo "Making sure that binaries are up to date..." | 25 | echo "Making sure that binaries are up to date..." |
20 | while read i; do | 26 | while read i; do |
21 | make bin/$i | 27 | make bin/$i |
@@ -33,11 +39,10 @@ do | |||
33 | # Skip default_smp_affinity | 39 | # Skip default_smp_affinity |
34 | if [ -d $IRQ ]; then | 40 | if [ -d $IRQ ]; then |
35 | irqList[$i]=$(cat $IRQ/smp_affinity_list) | 41 | irqList[$i]=$(cat $IRQ/smp_affinity_list) |
36 | echo 0 > $IRQ/smp_affinity_list | 42 | echo 0 2> /dev/null > $IRQ/smp_affinity_list |
37 | fi | 43 | fi |
38 | i=$(( $i + 1 )) | 44 | i=$(( $i + 1 )) |
39 | done | 45 | done |
40 | echo "Done. Beginning benchmarks..." | ||
41 | 46 | ||
42 | # Read the names of each benchmark | 47 | # Read the names of each benchmark |
43 | j=0 | 48 | j=0 |
@@ -46,20 +51,106 @@ while read i; do | |||
46 | j=$(( $j + 1 )) | 51 | j=$(( $j + 1 )) |
47 | done < $tacleNames | 52 | done < $tacleNames |
48 | 53 | ||
54 | echo "Done. Checking for wbinvd module..." | ||
55 | if [[ ! -f "/proc/wbinvd" ]]; then | ||
56 | echo "ERROR: wbinvd module not loaded. Exiting..." | ||
57 | exit | ||
58 | fi | ||
59 | |||
60 | echo "Done. Setting cores $firstCore and $secondCore to 'performance'..." | ||
61 | echo "performance" > /sys/devices/system/cpu/cpu$firstCore/cpufreq/scaling_governor | ||
62 | echo "performance" > /sys/devices/system/cpu/cpu$secondCore/cpufreq/scaling_governor | ||
63 | |||
64 | # Enable L3 isolation | ||
65 | echo "Done. Enabling L3 isolation..." | ||
66 | mount -t resctrl resctrl /sys/fs/resctrl | ||
67 | mkdir -p /sys/fs/resctrl/benchmarks | ||
68 | echo $firstCore > /sys/fs/resctrl/benchmarks/cpus_list | ||
69 | echo $secondCore > /sys/fs/resctrl/benchmarks/cpus_list | ||
70 | # Reset global bandwith control and remove L3 from global | ||
71 | echo "L3:0=ffff;1=ffff;2=ffff;3=0000" > /sys/fs/resctrl/schemata | ||
72 | echo "MB:0=2048;1=2048;2=2048;3=2048" > /sys/fs/resctrl/schemata | ||
73 | # Alloc L3 to benchmark | ||
74 | echo "L3:0=0000;1=0000;2=0000;3=ffff" > /sys/fs/resctrl/benchmarks/schemata | ||
75 | echo "MB:0=2048;1=2048;2=2048;3=2048" > /sys/fs/resctrl/benchmarks/schemata | ||
76 | echo "Done. Verifying configuration with user..." | ||
77 | |||
78 | # Generate file name string | ||
79 | # We append to this as we parse the environment settings | ||
80 | runID=$(date +"%b%d-%H") | ||
81 | |||
82 | # Confirm configuration with user | ||
83 | echo "=== Global Config ===" | ||
84 | cat /sys/fs/resctrl/schemata | ||
85 | echo "=== Core $firstCore and $secondCore Config ===" | ||
86 | cat /sys/fs/resctrl/benchmarks/schemata | ||
87 | if [[ $6 == "--contend" ]]; then | ||
88 | if [[ ! -f "/playpen/mc2/imx6q-thrasher/thrasher" ]]; then | ||
89 | echo "ERROR: thrasher binary not fonud. Exiting..." | ||
90 | exit | ||
91 | fi | ||
92 | echo "Will run 6 contending tasks" | ||
93 | runID=$runID-c | ||
94 | else | ||
95 | runID=$runID-xc | ||
96 | fi | ||
97 | if uname -a | grep -q "mc2"; then | ||
98 | echo "MC^2 Autodetected. Cache coloring will be enabled." | ||
99 | runID=$runID-i | ||
100 | else | ||
101 | echo "MC^2 not detected. Cache coloring will be DISABLED." | ||
102 | runID=$runID-xi | ||
103 | fi | ||
104 | if pwd | grep -qi dis; then | ||
105 | echo "Autodetected DIS. Will use script-level looping." | ||
106 | fi | ||
107 | echo "Results will be saved as $runID-$userRunID-A.txt and $runID-$userRunID-B.txt" | ||
108 | echo "Press enter to confirm environment, Ctrl-C to exit..." | ||
109 | read | ||
110 | |||
111 | # Start contending tasks | ||
112 | if [[ $6 == "--contend" ]]; then | ||
113 | echo "Done. Starting 6 contending tasks..." | ||
114 | # Run two contending tasks on each other CCX | ||
115 | taskset -c 1 /playpen/mc2/imx6q-thrasher/thrasher & | ||
116 | taskset -c 2 /playpen/mc2/imx6q-thrasher/thrasher & | ||
117 | taskset -c 5 /playpen/mc2/imx6q-thrasher/thrasher & | ||
118 | taskset -c 6 /playpen/mc2/imx6q-thrasher/thrasher & | ||
119 | taskset -c 9 /playpen/mc2/imx6q-thrasher/thrasher & | ||
120 | taskset -c 10 /playpen/mc2/imx6q-thrasher/thrasher & | ||
121 | fi | ||
122 | sleep 1 # Wait for contending tasks to start | ||
123 | echo "Done. Beginning benchmarks..." | ||
49 | 124 | ||
50 | num_tests=$(wc -l < $tacleNames) | 125 | num_tests=$(wc -l < $tacleNames) |
51 | for (( i = 0; i < $num_tests ; i++ )) | 126 | for (( i = 0; i < $num_tests ; i++ )) |
52 | do | 127 | do |
53 | for (( j = $i; j < $num_tests ; j++ )) #loop through programs | 128 | for (( j = $i; j < $num_tests ; j++ )) #loop through programs |
54 | do | 129 | do |
55 | chrt -r 97 taskset -c $firstCore ./bin/${tacleProg[$i]} ${tacleProg[$i]} $maxJobs $firstCore $secondCore ${tacleProg[$j]} $runID"-A" 1 & \ | 130 | # If using DIS, we have to iterate in the script as DIS won't do it for us |
56 | chrt -r 97 taskset -c $secondCore ./bin/${tacleProg[$j]} ${tacleProg[$j]} $maxJobs $secondCore $firstCore ${tacleProg[$i]} $runID"-B" 2 & | 131 | pwd | grep -qi dis |
57 | wait | 132 | iters=$(python3 -c "print(int(not "$?")*("$maxJobs"-1))") |
133 | for ((k=0;k<=iters;k++)); do | ||
134 | # Autodetect MC^2 | ||
135 | if uname -a | grep -q "mc2"; then | ||
136 | chrt -r 97 numactl -m 0 taskset -c $firstCore ./bin/${tacleProg[$i]} ${tacleProg[$i]} $maxJobs $firstCore $secondCore ${tacleProg[$j]} $runID-$userRunID"-A" 1 & PID1=$!; | ||
137 | chrt -r 97 numactl -m 1 taskset -c $secondCore ./bin/${tacleProg[$j]} ${tacleProg[$j]} $maxJobs $secondCore $firstCore ${tacleProg[$i]} $runID-$userRunID"-B" 2 & PID2=$!; | ||
138 | else | ||
139 | chrt -r 97 taskset -c $firstCore ./bin/${tacleProg[$i]} ${tacleProg[$i]} $maxJobs $firstCore $secondCore ${tacleProg[$j]} $runID-$userRunID-A 1 & PID1=$!; | ||
140 | chrt -r 97 taskset -c $secondCore ./bin/${tacleProg[$j]} ${tacleProg[$j]} $maxJobs $secondCore $firstCore ${tacleProg[$i]} $runID-$userRunID-B 2 & PID2=$!; | ||
141 | fi | ||
142 | wait $PID1 $PID2 | ||
143 | done | ||
58 | echo ${tacleProg[$i]} ${tacleProg[$j]} | 144 | echo ${tacleProg[$i]} ${tacleProg[$j]} |
59 | done | 145 | done |
60 | echo COMPLETE: ${tacleProg[$i]} | 146 | echo COMPLETE: ${tacleProg[$i]} |
61 | done | 147 | done |
62 | 148 | ||
149 | # End contending tasks | ||
150 | if [[ $6 == "--contend" ]]; then | ||
151 | killall thrasher | ||
152 | fi | ||
153 | |||
63 | # Remove semaphores from system | 154 | # Remove semaphores from system |
64 | # Leaving them won't hurt these tests, but would be messy and is bad practice | 155 | # Leaving them won't hurt these tests, but would be messy and is bad practice |
65 | # TODO: Do this directly in the benchmarks. They should clean up after themselves | 156 | # TODO: Do this directly in the benchmarks. They should clean up after themselves |
@@ -70,7 +161,7 @@ i=0 | |||
70 | for IRQ in /proc/irq/* | 161 | for IRQ in /proc/irq/* |
71 | do | 162 | do |
72 | if [ -d $IRQ ]; then | 163 | if [ -d $IRQ ]; then |
73 | echo ${irqList[$i]} > $IRQ/smp_affinity_list | 164 | echo ${irqList[$i]} 2> /dev/null > $IRQ/smp_affinity_list |
74 | fi | 165 | fi |
75 | i=$(( $i + 1 )) | 166 | i=$(( $i + 1 )) |
76 | done | 167 | done |
diff --git a/all_pairs/run_all_pairs_L3_ONLY.sh b/all_pairs/run_all_pairs_L3_ONLY.sh new file mode 100755 index 0000000..8ed5eeb --- /dev/null +++ b/all_pairs/run_all_pairs_L3_ONLY.sh | |||
@@ -0,0 +1,170 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | firstCore=$1 | ||
4 | secondCore=$2 | ||
5 | maxJobs=$3 | ||
6 | userRunID=$4 | ||
7 | tacleNames=tacleNames.txt | ||
8 | |||
9 | if [ $# -lt 4 ]; then | ||
10 | echo "Usage $0 <first core ID> <second core ID> <number of iterations> <run ID> [TACLe names file] [--contend]" | ||
11 | exit | ||
12 | fi | ||
13 | |||
14 | if [ $# -gt 4 ]; then | ||
15 | echo "Using alternate list of TACLe benchmarks from $5" | ||
16 | tacleNames=$5 | ||
17 | fi | ||
18 | |||
19 | if [ "$EUID" -ne 0 ] | ||
20 | then | ||
21 | echo "You need to be root to enable interrupt isolation and real-time execution!" | ||
22 | exit | ||
23 | fi | ||
24 | |||
25 | echo "Making sure that binaries are up to date..." | ||
26 | while read i; do | ||
27 | make bin/$i | ||
28 | done < $tacleNames | ||
29 | echo "Done. Disabling real-time throttling..." | ||
30 | |||
31 | # Turn off rt throttling | ||
32 | echo -1 > /proc/sys/kernel/sched_rt_runtime_us | ||
33 | echo "Done. Redirecting all interrupts to core 0..." | ||
34 | |||
35 | # Redirect all interrupts to core 0 | ||
36 | i=0 | ||
37 | for IRQ in /proc/irq/* | ||
38 | do | ||
39 | # Skip default_smp_affinity | ||
40 | if [ -d $IRQ ]; then | ||
41 | irqList[$i]=$(cat $IRQ/smp_affinity_list) | ||
42 | echo 0 2> /dev/null > $IRQ/smp_affinity_list | ||
43 | fi | ||
44 | i=$(( $i + 1 )) | ||
45 | done | ||
46 | |||
47 | # Read the names of each benchmark | ||
48 | j=0 | ||
49 | while read i; do | ||
50 | tacleProg[$j]=$i | ||
51 | j=$(( $j + 1 )) | ||
52 | done < $tacleNames | ||
53 | |||
54 | echo "Done. Checking for wbinvd module..." | ||
55 | if [[ ! -f "/proc/wbinvd" ]]; then | ||
56 | echo "ERROR: wbinvd module not loaded. Exiting..." | ||
57 | exit | ||
58 | fi | ||
59 | |||
60 | # Enable L3 isolation | ||
61 | echo "Done. Enabling L3 isolation..." | ||
62 | mount -t resctrl resctrl /sys/fs/resctrl | ||
63 | mkdir -p /sys/fs/resctrl/benchmarks | ||
64 | mkdir -p /sys/fs/resctrl/benchmarks2 | ||
65 | echo $firstCore > /sys/fs/resctrl/benchmarks/cpus_list | ||
66 | echo $secondCore > /sys/fs/resctrl/benchmarks2/cpus_list | ||
67 | # Reset global bandwith control and remove L3 from global | ||
68 | echo "L3:0=ffff;1=ffff;2=ffff;3=0000" > /sys/fs/resctrl/schemata | ||
69 | echo "MB:0=2048;1=2048;2=2048;3=2048" > /sys/fs/resctrl/schemata | ||
70 | # Alloc half L3 to benchmark | ||
71 | echo "L3:0=0000;1=0000;2=0000;3=ff00" > /sys/fs/resctrl/benchmarks/schemata | ||
72 | echo "MB:0=2048;1=2048;2=2048;3=2048" > /sys/fs/resctrl/benchmarks/schemata | ||
73 | # Alloc other half L3 to benchmark2 | ||
74 | echo "L3:0=0000;1=0000;2=0000;3=00ff" > /sys/fs/resctrl/benchmarks2/schemata | ||
75 | echo "MB:0=2048;1=2048;2=2048;3=2048" > /sys/fs/resctrl/benchmarks2/schemata | ||
76 | echo "Done. Verifying configuration with user..." | ||
77 | |||
78 | # Generate file name string | ||
79 | # We append to this as we parse the environment settings | ||
80 | runID=$(date +"%b%d-%H") | ||
81 | |||
82 | # Confirm configuration with user | ||
83 | echo "=== Global Config ===" | ||
84 | cat /sys/fs/resctrl/schemata | ||
85 | echo "=== Core $firstCore Config ===" | ||
86 | cat /sys/fs/resctrl/benchmarks/schemata | ||
87 | echo "=== Core $secondCore Config ===" | ||
88 | cat /sys/fs/resctrl/benchmarks2/schemata | ||
89 | if [[ $6 == "--contend" ]]; then | ||
90 | if [[ ! -f "/playpen/mc2/imx6q-thrasher/thrasher" ]]; then | ||
91 | echo "ERROR: thrasher binary not found. Exiting..." | ||
92 | exit | ||
93 | fi | ||
94 | echo "Will run 6 contending tasks" | ||
95 | runID=$runID-c | ||
96 | else | ||
97 | runID=$runID-xc | ||
98 | fi | ||
99 | if uname -a | grep -q "mc2"; then | ||
100 | echo "MC^2 Autodetected. Not supported by this script!." | ||
101 | exit | ||
102 | else | ||
103 | echo "MC^2 not detected. Cache coloring will be enabled in the L3 only.." | ||
104 | runID=$runID-i3 | ||
105 | fi | ||
106 | if pwd | grep -qi dis; then | ||
107 | echo "Autodetected DIS. Will use script-level looping." | ||
108 | fi | ||
109 | echo "Results will be saved as $runID-$userRunID-A.txt and $runID-$userRunID-B.txt" | ||
110 | echo "Press enter to confirm environment, Ctrl-C to exit..." | ||
111 | read | ||
112 | |||
113 | # Start contending tasks | ||
114 | if [[ $6 == "--contend" ]]; then | ||
115 | echo "Done. Starting 6 contending tasks..." | ||
116 | # Run two contending tasks on each other CCX | ||
117 | taskset -c 1 /playpen/mc2/imx6q-thrasher/thrasher & | ||
118 | taskset -c 2 /playpen/mc2/imx6q-thrasher/thrasher & | ||
119 | taskset -c 5 /playpen/mc2/imx6q-thrasher/thrasher & | ||
120 | taskset -c 6 /playpen/mc2/imx6q-thrasher/thrasher & | ||
121 | taskset -c 9 /playpen/mc2/imx6q-thrasher/thrasher & | ||
122 | taskset -c 10 /playpen/mc2/imx6q-thrasher/thrasher & | ||
123 | fi | ||
124 | sleep 1 # Wait for contending tasks to start | ||
125 | echo "Done. Beginning benchmarks..." | ||
126 | |||
127 | num_tests=$(wc -l < $tacleNames) | ||
128 | for (( i = 0; i < $num_tests ; i++ )) | ||
129 | do | ||
130 | for (( j = $i; j < $num_tests ; j++ )) #loop through programs | ||
131 | do | ||
132 | # If using DIS, we have to iterate in the script as DIS won't do it for us | ||
133 | pwd | grep -qi dis | ||
134 | iters=$(python3 -c "print(int(not "$?")*("$maxJobs"-1))") | ||
135 | for ((k=0;k<=iters;k++)); do | ||
136 | # Autodetect MC^2 | ||
137 | if uname -a | grep -q "mc2"; then | ||
138 | chrt -r 97 numactl -m 0 taskset -c $firstCore ./bin/${tacleProg[$i]} ${tacleProg[$i]} $maxJobs $firstCore $secondCore ${tacleProg[$j]} $runID-$userRunID"-A" 1 & PID1=$!; | ||
139 | chrt -r 97 numactl -m 1 taskset -c $secondCore ./bin/${tacleProg[$j]} ${tacleProg[$j]} $maxJobs $secondCore $firstCore ${tacleProg[$i]} $runID-$userRunID"-B" 2 & PID2=$!; | ||
140 | else | ||
141 | chrt -r 97 taskset -c $firstCore ./bin/${tacleProg[$i]} ${tacleProg[$i]} $maxJobs $firstCore $secondCore ${tacleProg[$j]} $runID-$userRunID-A 1 & PID1=$!; | ||
142 | chrt -r 97 taskset -c $secondCore ./bin/${tacleProg[$j]} ${tacleProg[$j]} $maxJobs $secondCore $firstCore ${tacleProg[$i]} $runID-$userRunID-B 2 & PID2=$!; | ||
143 | fi | ||
144 | wait $PID1 $PID2 | ||
145 | done | ||
146 | echo ${tacleProg[$i]} ${tacleProg[$j]} | ||
147 | done | ||
148 | echo COMPLETE: ${tacleProg[$i]} | ||
149 | done | ||
150 | |||
151 | # End contending tasks | ||
152 | if [[ $6 == "--contend" ]]; then | ||
153 | killall thrasher | ||
154 | fi | ||
155 | |||
156 | # Remove semaphores from system | ||
157 | # Leaving them won't hurt these tests, but would be messy and is bad practice | ||
158 | # TODO: Do this directly in the benchmarks. They should clean up after themselves | ||
159 | ./bin/cleanupSemaphores | ||
160 | |||
161 | # Put smp_affinty back the way it was | ||
162 | i=0 | ||
163 | for IRQ in /proc/irq/* | ||
164 | do | ||
165 | if [ -d $IRQ ]; then | ||
166 | echo ${irqList[$i]} 2> /dev/null > $IRQ/smp_affinity_list | ||
167 | fi | ||
168 | i=$(( $i + 1 )) | ||
169 | done | ||
170 | |||
diff --git a/baseline/run_baseline.sh b/baseline/run_baseline.sh index f7a98fa..c5b67b6 100755 --- a/baseline/run_baseline.sh +++ b/baseline/run_baseline.sh | |||
@@ -2,11 +2,11 @@ | |||
2 | 2 | ||
3 | core=$1 | 3 | core=$1 |
4 | maxJobs=$2 | 4 | maxJobs=$2 |
5 | runID=$3 | 5 | userRunID=$3 |
6 | tacleNames=tacleNames.txt | 6 | tacleNames=tacleNames.txt |
7 | 7 | ||
8 | if [ $# -lt 3 ]; then | 8 | if [ $# -lt 3 ]; then |
9 | echo "Usage $0 <core ID> <number of iterations> <run ID> [TACLe names file]" | 9 | echo "Usage $0 <core ID> <number of iterations> <run ID> [TACLe names file] [--contend]" |
10 | exit | 10 | exit |
11 | fi | 11 | fi |
12 | 12 | ||
@@ -15,6 +15,12 @@ if [ $# -gt 3 ]; then | |||
15 | tacleNames=$4 | 15 | tacleNames=$4 |
16 | fi | 16 | fi |
17 | 17 | ||
18 | if [ "$EUID" -ne 0 ] | ||
19 | then | ||
20 | echo "You need to be root to enable interrupt isolation and real-time execution!" | ||
21 | exit | ||
22 | fi | ||
23 | |||
18 | echo "Making sure that binaries are up to date..." | 24 | echo "Making sure that binaries are up to date..." |
19 | while read i; do | 25 | while read i; do |
20 | make bin/$i | 26 | make bin/$i |
@@ -32,11 +38,10 @@ do | |||
32 | # Skip default_smp_affinity | 38 | # Skip default_smp_affinity |
33 | if [ -d $IRQ ]; then | 39 | if [ -d $IRQ ]; then |
34 | irqList[$i]=$(cat $IRQ/smp_affinity_list) | 40 | irqList[$i]=$(cat $IRQ/smp_affinity_list) |
35 | echo 0 > $IRQ/smp_affinity_list | 41 | echo 0 2> /dev/null > $IRQ/smp_affinity_list |
36 | fi | 42 | fi |
37 | i=$(( $i + 1 )) | 43 | i=$(( $i + 1 )) |
38 | done | 44 | done |
39 | echo "Done. Beginning benchmarks..." | ||
40 | 45 | ||
41 | # Read the names of each benchmark | 46 | # Read the names of each benchmark |
42 | j=0 | 47 | j=0 |
@@ -45,25 +50,106 @@ while read i; do | |||
45 | j=$(( $j + 1 )) | 50 | j=$(( $j + 1 )) |
46 | done < $tacleNames | 51 | done < $tacleNames |
47 | 52 | ||
53 | echo "Done. Checking for wbinvd module..." | ||
54 | if [[ ! -f "/proc/wbinvd" ]]; then | ||
55 | echo "ERROR: wbinvd module not loaded. Exiting..." | ||
56 | exit | ||
57 | fi | ||
58 | |||
59 | echo "Done. Setting cores $firstCore and $secondCore to 'performance'..." | ||
60 | echo "performance" > /sys/devices/system/cpu/cpu15/cpufreq/scaling_governor | ||
61 | echo "performance" > /sys/devices/system/cpu/cpu31/cpufreq/scaling_governo | ||
62 | |||
63 | # Enable L3 isolation | ||
64 | echo "Done. Enabling L3 isolation..." | ||
65 | mount -t resctrl resctrl /sys/fs/resctrl | ||
66 | mkdir -p /sys/fs/resctrl/benchmarks | ||
67 | echo $1 > /sys/fs/resctrl/benchmarks/cpus_list | ||
68 | # Reset global bandwith control and remove L3 from global | ||
69 | 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 | ||
71 | # Alloc L3 to benchmark | ||
72 | echo "L3:0=0000;1=0000;2=0000;3=ffff" > /sys/fs/resctrl/benchmarks/schemata | ||
73 | echo "MB:0=2048;1=2048;2=2048;3=2048" > /sys/fs/resctrl/benchmarks/schemata | ||
74 | echo "Done. Verifying configuration with user..." | ||
75 | |||
76 | # Generate file name string | ||
77 | # We append to this as we parse the environment settings | ||
78 | runID=$(date +"%b%d-%H") | ||
79 | |||
80 | # Confirm configuration with user | ||
81 | echo "=== Global Config ===" | ||
82 | cat /sys/fs/resctrl/schemata | ||
83 | echo "=== Core $1 Config ===" | ||
84 | cat /sys/fs/resctrl/benchmarks/schemata | ||
85 | if [[ $5 == "--contend" ]]; then | ||
86 | if [[ ! -f "/playpen/mc2/imx6q-thrasher/thrasher" ]]; then | ||
87 | echo "ERROR: thrasher binary not fonud. Exiting..." | ||
88 | exit | ||
89 | fi | ||
90 | echo "Will run 6 contending tasks" | ||
91 | runID=$runID-c | ||
92 | else | ||
93 | runID=$runID-xc | ||
94 | fi | ||
95 | if uname -a | grep -q "mc2"; then | ||
96 | echo "MC^2 Autodetected. Cache coloring and interleaving will be enabled." | ||
97 | runID=$runID-i | ||
98 | else | ||
99 | echo "MC^2 not detected." | ||
100 | runID=$runID-xi | ||
101 | 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" | ||
106 | echo "Press enter to confirm environment, Ctrl-C to exit..." | ||
107 | read | ||
108 | |||
109 | # Start contending tasks | ||
110 | if [[ $5 == "--contend" ]]; then | ||
111 | echo "Done. Starting 6 contending tasks..." | ||
112 | # Run two contending tasks on each other CCX | ||
113 | taskset -c 1 /playpen/mc2/imx6q-thrasher/thrasher & | ||
114 | taskset -c 2 /playpen/mc2/imx6q-thrasher/thrasher & | ||
115 | taskset -c 5 /playpen/mc2/imx6q-thrasher/thrasher & | ||
116 | taskset -c 6 /playpen/mc2/imx6q-thrasher/thrasher & | ||
117 | taskset -c 9 /playpen/mc2/imx6q-thrasher/thrasher & | ||
118 | taskset -c 10 /playpen/mc2/imx6q-thrasher/thrasher & | ||
119 | fi | ||
120 | sleep 1 # Wait for contending tasks to start | ||
121 | echo "Done. Beginning benchmarks..." | ||
48 | 122 | ||
49 | num_tests=$(wc -l < $tacleNames) | 123 | num_tests=$(wc -l < $tacleNames) |
50 | for (( i = 0; i < $num_tests ; i++ )) | 124 | for (( i = 0; i < $num_tests ; i++ )) |
51 | do | 125 | do |
52 | # Check if we're using LITMUS^RT or not | 126 | # If using DIS, we have to iterate in the script as DIS won't do it for us |
53 | if grep -q "#define LITMUS 1" source/extra.h; then | 127 | pwd | grep -qi dis |
54 | ./bin/${tacleProg[$i]} ${tacleProg[$i]} $maxJobs $core $runID 1 | 128 | iters=$(python3 -c "print(int(not "$?")*("$maxJobs"-1))") |
55 | else | 129 | for ((k=0;k<=iters;k++)); do |
56 | chrt -r 97 taskset -c $core ./bin/${tacleProg[$i]} ${tacleProg[$i]} $maxJobs $core $runID 1 | 130 | # Check if we're using LITMUS^RT or not |
57 | fi | 131 | if [[ -f source/extra.h ]] && grep -q "#define LITMUS 1" source/extra.h; then |
132 | ./bin/${tacleProg[$i]} ${tacleProg[$i]} $maxJobs $core $runID-$userRunID 1 | ||
133 | else | ||
134 | # 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 | ||
136 | #chrt -r 97 numactl -m 0 taskset -c $core ./bin/${tacleProg[$i]} ${tacleProg[$i]} $maxJobs $core $runID-$userRunID-NOINTERLEAVE 1 | ||
137 | fi | ||
138 | done | ||
58 | echo COMPLETE: ${tacleProg[$i]} | 139 | echo COMPLETE: ${tacleProg[$i]} |
59 | done | 140 | done |
60 | 141 | ||
142 | # End contending tasks | ||
143 | if [[ $5 == "--contend" ]]; then | ||
144 | killall thrasher | ||
145 | fi | ||
146 | |||
61 | # Put smp_affinty back the way it was | 147 | # Put smp_affinty back the way it was |
62 | i=0 | 148 | i=0 |
63 | for IRQ in /proc/irq/* | 149 | for IRQ in /proc/irq/* |
64 | do | 150 | do |
65 | if [ -d $IRQ ]; then | 151 | if [ -d $IRQ ]; then |
66 | echo ${irqList[$i]} > $IRQ/smp_affinity_list | 152 | echo ${irqList[$i]} 2> /dev/null > $IRQ/smp_affinity_list |
67 | fi | 153 | fi |
68 | i=$(( $i + 1 )) | 154 | i=$(( $i + 1 )) |
69 | done | 155 | done |
diff --git a/baseline/run_baseline_L3_ONLY.sh b/baseline/run_baseline_L3_ONLY.sh new file mode 100755 index 0000000..4183653 --- /dev/null +++ b/baseline/run_baseline_L3_ONLY.sh | |||
@@ -0,0 +1,152 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | core=$1 | ||
4 | maxJobs=$2 | ||
5 | userRunID=$3 | ||
6 | tacleNames=tacleNames.txt | ||
7 | |||
8 | if [ $# -lt 3 ]; then | ||
9 | echo "Usage $0 <core ID> <number of iterations> <run ID> [TACLe names file] [--contend]" | ||
10 | exit | ||
11 | fi | ||
12 | |||
13 | if [ $# -gt 3 ]; then | ||
14 | echo "Using alternate list of TACLe benchmarks from $4" | ||
15 | tacleNames=$4 | ||
16 | fi | ||
17 | |||
18 | if [ "$EUID" -ne 0 ] | ||
19 | then | ||
20 | echo "You need to be root to enable interrupt isolation and real-time execution!" | ||
21 | exit | ||
22 | fi | ||
23 | |||
24 | echo "Making sure that binaries are up to date..." | ||
25 | while read i; do | ||
26 | make bin/$i | ||
27 | done < $tacleNames | ||
28 | echo "Done. Disabling real-time throttling..." | ||
29 | |||
30 | # Turn off rt throttling | ||
31 | echo -1 > /proc/sys/kernel/sched_rt_runtime_us | ||
32 | echo "Done. Redirecting all interrupts to core 0..." | ||
33 | |||
34 | # Redirect all interrupts to core 0 | ||
35 | i=0 | ||
36 | for IRQ in /proc/irq/* | ||
37 | do | ||
38 | # Skip default_smp_affinity | ||
39 | if [ -d $IRQ ]; then | ||
40 | irqList[$i]=$(cat $IRQ/smp_affinity_list) | ||
41 | echo 0 2> /dev/null > $IRQ/smp_affinity_list | ||
42 | fi | ||
43 | i=$(( $i + 1 )) | ||
44 | done | ||
45 | |||
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..." | ||
54 | if [[ ! -f "/proc/wbinvd" ]]; then | ||
55 | echo "ERROR: wbinvd module not loaded. Exiting..." | ||
56 | exit | ||
57 | fi | ||
58 | |||
59 | # Enable L3 isolation | ||
60 | echo "Done. Enabling L3 isolation..." | ||
61 | mount -t resctrl resctrl /sys/fs/resctrl | ||
62 | mkdir -p /sys/fs/resctrl/benchmarks | ||
63 | echo $1 > /sys/fs/resctrl/benchmarks/cpus_list | ||
64 | # Reset global bandwith control and remove L3 from global | ||
65 | echo "L3:0=ffff;1=ffff;2=ffff;3=0000" > /sys/fs/resctrl/schemata | ||
66 | echo "MB:0=2048;1=2048;2=2048;3=2048" > /sys/fs/resctrl/schemata | ||
67 | # Alloc L3 to benchmark | ||
68 | echo "L3:0=0000;1=0000;2=0000;3=00ff" > /sys/fs/resctrl/benchmarks/schemata | ||
69 | echo "MB:0=2048;1=2048;2=2048;3=2048" > /sys/fs/resctrl/benchmarks/schemata | ||
70 | echo "Done. Verifying configuration with user..." | ||
71 | |||
72 | # Generate file name string | ||
73 | # We append to this as we parse the environment settings | ||
74 | runID=$(date +"%b%d-%H") | ||
75 | |||
76 | # Confirm configuration with user | ||
77 | echo "=== Global Config ===" | ||
78 | cat /sys/fs/resctrl/schemata | ||
79 | echo "=== Core $1 Config ===" | ||
80 | cat /sys/fs/resctrl/benchmarks/cpus_list | ||
81 | cat /sys/fs/resctrl/benchmarks/schemata | ||
82 | if [[ $5 == "--contend" ]]; then | ||
83 | if [[ ! -f "/playpen/mc2/imx6q-thrasher/thrasher" ]]; then | ||
84 | echo "ERROR: thrasher binary not fonud. Exiting..." | ||
85 | exit | ||
86 | fi | ||
87 | echo "Will run 6 contending tasks" | ||
88 | runID=$runID-c | ||
89 | else | ||
90 | runID=$runID-xc | ||
91 | fi | ||
92 | if uname -a | grep -q "mc2"; then | ||
93 | echo "MC^2 Autodetected. NOT SUPPORTED. Exiting..." | ||
94 | exit | ||
95 | else | ||
96 | echo "MC^2 not detected. 50% L3 allocation enabled." | ||
97 | runID=$runID-i3 | ||
98 | fi | ||
99 | if pwd | grep -qi dis; then | ||
100 | echo "Autodetected DIS. Will use script-level looping." | ||
101 | fi | ||
102 | echo "Results will be saved as $runID-$userRunID.txt" | ||
103 | echo "Press enter to confirm environment, Ctrl-C to exit..." | ||
104 | read | ||
105 | |||
106 | # Start contending tasks | ||
107 | if [[ $5 == "--contend" ]]; then | ||
108 | echo "Done. Starting 6 contending tasks..." | ||
109 | # Run two contending tasks on each other CCX | ||
110 | taskset -c 1 /playpen/mc2/imx6q-thrasher/thrasher & | ||
111 | taskset -c 2 /playpen/mc2/imx6q-thrasher/thrasher & | ||
112 | taskset -c 5 /playpen/mc2/imx6q-thrasher/thrasher & | ||
113 | taskset -c 6 /playpen/mc2/imx6q-thrasher/thrasher & | ||
114 | taskset -c 9 /playpen/mc2/imx6q-thrasher/thrasher & | ||
115 | taskset -c 10 /playpen/mc2/imx6q-thrasher/thrasher & | ||
116 | fi | ||
117 | sleep 1 # Wait for contending tasks to start | ||
118 | echo "Done. Beginning benchmarks..." | ||
119 | |||
120 | num_tests=$(wc -l < $tacleNames) | ||
121 | for (( i = 0; i < $num_tests ; i++ )) | ||
122 | do | ||
123 | # If using DIS, we have to iterate in the script as DIS won't do it for us | ||
124 | pwd | grep -qi dis | ||
125 | iters=$(python3 -c "print(int(not "$?")*("$maxJobs"-1))") | ||
126 | for ((k=0;k<=iters;k++)); do | ||
127 | # Check if we're using LITMUS^RT or not | ||
128 | if [[ -f source/extra.h ]] && grep -q "#define LITMUS 1" source/extra.h; then | ||
129 | ./bin/${tacleProg[$i]} ${tacleProg[$i]} $maxJobs $core $runID-$userRunID 1 | ||
130 | else | ||
131 | # Interleave memory allocations between all nodes (only 1 node w/out MC^2) | ||
132 | chrt -r 97 numactl --interleave=all taskset -c $core ./bin/${tacleProg[$i]} ${tacleProg[$i]} $maxJobs $core $runID-$userRunID 1 | ||
133 | fi | ||
134 | done | ||
135 | echo COMPLETE: ${tacleProg[$i]} | ||
136 | done | ||
137 | |||
138 | # End contending tasks | ||
139 | if [[ $5 == "--contend" ]]; then | ||
140 | killall thrasher | ||
141 | fi | ||
142 | |||
143 | # Put smp_affinty back the way it was | ||
144 | i=0 | ||
145 | for IRQ in /proc/irq/* | ||
146 | do | ||
147 | if [ -d $IRQ ]; then | ||
148 | echo ${irqList[$i]} 2> /dev/null > $IRQ/smp_affinity_list | ||
149 | fi | ||
150 | i=$(( $i + 1 )) | ||
151 | done | ||
152 | |||
diff --git a/run_tacle_rtss20.sh b/run_tacle_rtss20.sh new file mode 100755 index 0000000..6770c55 --- /dev/null +++ b/run_tacle_rtss20.sh | |||
@@ -0,0 +1,48 @@ | |||
1 | #!/bin/bash | ||
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 | ||
4 | |||
5 | if uname -a | grep -q mc2; then | ||
6 | echo "You need to run this without MC^2!" | ||
7 | exit | ||
8 | fi | ||
9 | |||
10 | if [ "$EUID" -ne 0 ]; then | ||
11 | echo "You need to be root to enable interrupt isolation and real-time execution!" | ||
12 | exit | ||
13 | fi | ||
14 | |||
15 | echo "This will run the contended and uncontended TACLe baseline, all-pairs, and Level-C micro-benchamarks in non-interactive mode." | ||
16 | echo "Please press enter to confirm (Ctrl-C to abort)..." | ||
17 | read | ||
18 | |||
19 | echo "performance" > /sys/devices/system/cpu/cpu15/cpufreq/scaling_governor | ||
20 | echo "performance" > /sys/devices/system/cpu/cpu31/cpufreq/scaling_governor | ||
21 | |||
22 | cd baseline | ||
23 | baseNo=baseline/$(date +"%b%d-%H")-xc-xi-1k.txt | ||
24 | echo "" | ./run_baseline.sh 15 1001 1k ../all_pairs/tacleNames.txt | ||
25 | baseYes=baseline/$(date +"%b%d-%H")-c-xi-1k.txt | ||
26 | echo "" | ./run_baseline.sh 15 1001 1k ../all_pairs/tacleNames.txt --contend | ||
27 | |||
28 | cd ../all_pairs | ||
29 | pairsNo=all_pairs/$(date +"%b%d-%H")-xc-xi-1k | ||
30 | echo "" | ./run_all_pairs.sh 15 31 1001 1k ./tacleNames.txt | ||
31 | pairsYes=all_pairs/$(date +"%b%d-%H")-c-xi-1k | ||
32 | echo "" | ./run_all_pairs.sh 15 31 1001 1k ./tacleNames.txt --contend | ||
33 | |||
34 | cd ../baseline | ||
35 | echo "" | ../smt_analysis_rtss20/run_all_pairs_Level-C_TACLe.sh 15 31 1001 1k ./tacleNames.txt | ||
36 | cNo=all_pairs/$(date +"%b%d-%H")-xc-xi-1k-LC-TACLe.txt | ||
37 | echo "" | ../smt_analysis_rtss20/run_all_pairs_Level-C_TACLe.sh 15 31 1001 1k ./tacleNames.txt --contend | ||
38 | cYes=all_pairs/$(date +"%b%d-%H")-c-xi-1k-LC-TACLe.txt | ||
39 | |||
40 | echo "==== DONE ===" | ||
41 | echo "Results are in:" | ||
42 | echo "- "$baseNo | ||
43 | echo "- "$baseYes | ||
44 | echo "- "$pairsNo" (A/B)" | ||
45 | echo "- "$pairsYes" (A/B)" | ||
46 | echo "- "$cNo | ||
47 | echo "- "$cYes | ||
48 | |||
diff --git a/smt_analysis_rtss20/run_all_pairs_Level-C_TACLe.sh b/smt_analysis_rtss20/run_all_pairs_Level-C_TACLe.sh new file mode 100755 index 0000000..923dba0 --- /dev/null +++ b/smt_analysis_rtss20/run_all_pairs_Level-C_TACLe.sh | |||
@@ -0,0 +1,161 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | firstCore=$1 | ||
4 | secondCore=$2 | ||
5 | maxJobs=$3 | ||
6 | userRunID=$4 | ||
7 | tacleNames=tacleNames.txt | ||
8 | |||
9 | if [ $# -lt 4 ]; then | ||
10 | echo "Usage $0 <first core ID> <second core ID> <number of iterations> <run ID> [TACLe names file] [--contend]" | ||
11 | exit | ||
12 | fi | ||
13 | |||
14 | if [ $# -gt 4 ]; then | ||
15 | echo "Using alternate list of TACLe benchmarks from $5" | ||
16 | tacleNames=$5 | ||
17 | fi | ||
18 | |||
19 | if [ "$EUID" -ne 0 ] | ||
20 | then | ||
21 | echo "You need to be root to enable interrupt isolation and real-time execution!" | ||
22 | exit | ||
23 | fi | ||
24 | |||
25 | echo "Making sure that binaries are up to date..." | ||
26 | while read i; do | ||
27 | make bin/$i | ||
28 | done < $tacleNames | ||
29 | echo "Done. Disabling real-time throttling..." | ||
30 | |||
31 | # Turn off rt throttling | ||
32 | echo -1 > /proc/sys/kernel/sched_rt_runtime_us | ||
33 | echo "Done. Redirecting all interrupts to core 0..." | ||
34 | |||
35 | # Redirect all interrupts to core 0 | ||
36 | i=0 | ||
37 | for IRQ in /proc/irq/* | ||
38 | do | ||
39 | # Skip default_smp_affinity | ||
40 | if [ -d $IRQ ]; then | ||
41 | irqList[$i]=$(cat $IRQ/smp_affinity_list) | ||
42 | echo 0 2> /dev/null > $IRQ/smp_affinity_list | ||
43 | fi | ||
44 | i=$(( $i + 1 )) | ||
45 | done | ||
46 | |||
47 | # Read the names of each benchmark | ||
48 | j=0 | ||
49 | while read i; do | ||
50 | tacleProg[$j]=$i | ||
51 | j=$(( $j + 1 )) | ||
52 | done < $tacleNames | ||
53 | |||
54 | echo "Done. Checking for wbinvd module..." | ||
55 | if [[ ! -f "/proc/wbinvd" ]]; then | ||
56 | echo "ERROR: wbinvd module not loaded. Exiting..." | ||
57 | exit | ||
58 | fi | ||
59 | |||
60 | # Enable L3 isolation | ||
61 | echo "Done. Enabling L3 isolation..." | ||
62 | mount -t resctrl resctrl /sys/fs/resctrl | ||
63 | mkdir -p /sys/fs/resctrl/benchmarks | ||
64 | echo $firstCore > /sys/fs/resctrl/benchmarks/cpus_list | ||
65 | echo $secondCore > /sys/fs/resctrl/benchmarks/cpus_list | ||
66 | # Reset global bandwith control and remove L3 from global | ||
67 | echo "L3:0=ffff;1=ffff;2=ffff;3=0000" > /sys/fs/resctrl/schemata | ||
68 | echo "MB:0=2048;1=2048;2=2048;3=2048" > /sys/fs/resctrl/schemata | ||
69 | # Alloc L3 to benchmark | ||
70 | echo "L3:0=0000;1=0000;2=0000;3=ffff" > /sys/fs/resctrl/benchmarks/schemata | ||
71 | echo "MB:0=2048;1=2048;2=2048;3=2048" > /sys/fs/resctrl/benchmarks/schemata | ||
72 | echo "Done. Verifying configuration with user..." | ||
73 | |||
74 | # Generate file name string | ||
75 | # We append to this as we parse the environment settings | ||
76 | runID=$(date +"%b%d-%H") | ||
77 | |||
78 | # Confirm configuration with user | ||
79 | echo "=== Global Config ===" | ||
80 | cat /sys/fs/resctrl/schemata | ||
81 | echo "=== Core $firstCore and $secondCore Config ===" | ||
82 | cat /sys/fs/resctrl/benchmarks/schemata | ||
83 | if [[ $6 == "--contend" ]]; then | ||
84 | if [[ ! -f "/playpen/mc2/imx6q-thrasher/thrasher" ]]; then | ||
85 | echo "ERROR: thrasher binary not fonud. Exiting..." | ||
86 | exit | ||
87 | fi | ||
88 | echo "Will run 6 contending tasks" | ||
89 | runID=$runID-c | ||
90 | else | ||
91 | runID=$runID-xc | ||
92 | fi | ||
93 | if uname -a | grep -q "mc2"; then | ||
94 | echo "MC^2 Autodetected. Cache coloring will be DISABLED." | ||
95 | runID=$runID-i | ||
96 | else | ||
97 | echo "MC^2 not detected. Cache coloring will be DISABLED." | ||
98 | runID=$runID-xi | ||
99 | fi | ||
100 | echo "Results will be saved as $runID-$userRunID-LC-TACLe.txt" | ||
101 | echo "Press enter to confirm environment, Ctrl-C to exit..." | ||
102 | read | ||
103 | |||
104 | # Start contending tasks | ||
105 | if [[ $6 == "--contend" ]]; then | ||
106 | echo "Done. Starting 6 contending tasks..." | ||
107 | # Run two contending tasks on each other CCX | ||
108 | taskset -c 1 /playpen/mc2/imx6q-thrasher/thrasher & | ||
109 | taskset -c 2 /playpen/mc2/imx6q-thrasher/thrasher & | ||
110 | taskset -c 5 /playpen/mc2/imx6q-thrasher/thrasher & | ||
111 | taskset -c 6 /playpen/mc2/imx6q-thrasher/thrasher & | ||
112 | taskset -c 9 /playpen/mc2/imx6q-thrasher/thrasher & | ||
113 | taskset -c 10 /playpen/mc2/imx6q-thrasher/thrasher & | ||
114 | fi | ||
115 | sleep 1 # Wait for contending tasks to start | ||
116 | echo "Done. Beginning benchmarks..." | ||
117 | |||
118 | num_tests=$(wc -l < $tacleNames) | ||
119 | for (( i = 0; i < $num_tests ; i++ )) | ||
120 | do | ||
121 | # For level-C analysis, we must run all vs all | ||
122 | for (( j = 0; j < $num_tests ; j++ )) #loop through programs | ||
123 | do | ||
124 | # Autodetect MC^2 | ||
125 | if uname -a | grep -q "mc2"; then | ||
126 | # -1 loops means loop forever | ||
127 | chrt -r 97 numactl --interleave=all taskset -c $firstCore ./bin/${tacleProg[$i]} NULL -1 $firstCore NULL 0 & PID1=$!; | ||
128 | chrt -r 97 numactl --interleave=all taskset -c $secondCore ./bin/${tacleProg[$i]} ${tacleProg[$i]}"+"${tacleProg[$j]} $maxJobs $secondCore $runID-$userRunID-LC-TACLe 1 & PID2=$!; | ||
129 | else | ||
130 | chrt -r 97 taskset -c $firstCore ./bin/${tacleProg[$i]} NULL -1 $firstCore NULL 0 & PID1=$!; | ||
131 | chrt -r 97 taskset -c $secondCore ./bin/${tacleProg[$i]} ${tacleProg[$i]}"+"${tacleProg[$j]} $maxJobs $secondCore $runID-$userRunID-LC-TACLe 1 & PID2=$!; | ||
132 | fi | ||
133 | # The paired task runs continuously in this configuration, so we have | ||
134 | # to kill it once the task that we're measuring finishes. | ||
135 | wait $PID2 | ||
136 | kill $PID1 | ||
137 | echo ${tacleProg[$i]} ${tacleProg[$j]} | ||
138 | done | ||
139 | echo COMPLETE: ${tacleProg[$i]} | ||
140 | done | ||
141 | |||
142 | # End contending tasks | ||
143 | if [[ $6 == "--contend" ]]; then | ||
144 | killall thrasher | ||
145 | fi | ||
146 | |||
147 | # Remove semaphores from system | ||
148 | # Leaving them won't hurt these tests, but would be messy and is bad practice | ||
149 | # TODO: Do this directly in the benchmarks. They should clean up after themselves | ||
150 | ./bin/cleanupSemaphores | ||
151 | |||
152 | # Put smp_affinty back the way it was | ||
153 | i=0 | ||
154 | for IRQ in /proc/irq/* | ||
155 | do | ||
156 | if [ -d $IRQ ]; then | ||
157 | echo ${irqList[$i]} 2> /dev/null > $IRQ/smp_affinity_list | ||
158 | fi | ||
159 | i=$(( $i + 1 )) | ||
160 | done | ||
161 | |||