summaryrefslogtreecommitdiffstats
path: root/baseline
diff options
context:
space:
mode:
authorleochanj <jbakita@cs.unc.edu>2020-10-20 21:46:20 -0400
committerleochanj <jbakita@cs.unc.edu>2020-10-20 21:46:20 -0400
commite2b50015cebdfba68699abd6e8575e38230f5a78 (patch)
tree8bc28e082ad58e5fec07de81fd7c7f9bd9db2686 /baseline
parent79f30887129145e15e5172e36a7d7602859fc932 (diff)
parentdd606a16e840880e7617b140f6083af8ea83b6b7 (diff)
Merge branch 'rtas20-wip' into sd-vbs
Diffstat (limited to 'baseline')
-rwxr-xr-xbaseline/run_baseline.sh156
-rw-r--r--baseline/source/adpcm_dec/adpcm_dec.c12
-rw-r--r--baseline/source/adpcm_enc/adpcm_enc.c14
-rw-r--r--baseline/source/ammunition/ammunition.c14
-rw-r--r--baseline/source/anagram/anagram.c18
-rw-r--r--baseline/source/anagram/anagram_stdlib.c5
-rw-r--r--baseline/source/anagram/anagram_stdlib.h2
-rw-r--r--baseline/source/audiobeam/audiobeam.c20
-rw-r--r--baseline/source/audiobeam/audiobeamlibmalloc.c7
-rw-r--r--baseline/source/audiobeam/audiobeamlibmalloc.h2
-rw-r--r--baseline/source/cjpeg_transupp/cjpeg_transupp.c14
-rw-r--r--baseline/source/cjpeg_wrbmp/cjpeg_wrbmp.c16
-rw-r--r--baseline/source/dijkstra/dijkstra.c14
-rw-r--r--baseline/source/epic/epic.c23
-rw-r--r--baseline/source/fmref/fmref.c14
-rw-r--r--baseline/source/g723_enc/g723_enc.c45
-rw-r--r--baseline/source/gsm_dec/gsm_dec.c14
-rw-r--r--baseline/source/gsm_enc/gsm_enc.c14
-rw-r--r--baseline/source/h264_dec/h264_dec.c14
-rw-r--r--baseline/source/huff_dec/huff_dec.c18
-rw-r--r--baseline/source/huff_enc/huff_enc.c14
-rw-r--r--baseline/source/mpeg2/mpeg2.c14
-rw-r--r--baseline/source/ndes/ndes.c14
-rw-r--r--baseline/source/petrinet/petrinet.c12
-rw-r--r--baseline/source/rijndael_dec/rijndael_dec.c14
-rw-r--r--baseline/source/rijndael_enc/rijndael_enc.c22
-rw-r--r--baseline/source/statemate/statemate.c14
-rw-r--r--baseline/source/susan/susan.c14
28 files changed, 188 insertions, 366 deletions
diff --git a/baseline/run_baseline.sh b/baseline/run_baseline.sh
deleted file mode 100755
index c5b67b6..0000000
--- a/baseline/run_baseline.sh
+++ /dev/null
@@ -1,156 +0,0 @@
1#!/bin/bash
2
3core=$1
4maxJobs=$2
5userRunID=$3
6tacleNames=tacleNames.txt
7
8if [ $# -lt 3 ]; then
9 echo "Usage $0 <core ID> <number of iterations> <run ID> [TACLe names file] [--contend]"
10 exit
11fi
12
13if [ $# -gt 3 ]; then
14 echo "Using alternate list of TACLe benchmarks from $4"
15 tacleNames=$4
16fi
17
18if [ "$EUID" -ne 0 ]
19then
20 echo "You need to be root to enable interrupt isolation and real-time execution!"
21 exit
22fi
23
24echo "Making sure that binaries are up to date..."
25while read i; do
26 make bin/$i
27done < $tacleNames
28echo "Done. Disabling real-time throttling..."
29
30# Turn off rt throttling
31echo -1 > /proc/sys/kernel/sched_rt_runtime_us
32echo "Done. Redirecting all interrupts to core 0..."
33
34# Redirect all interrupts to core 0
35i=0
36for IRQ in /proc/irq/*
37do
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 ))
44done
45
46# Read the names of each benchmark
47j=0
48while read i; do
49 tacleProg[$j]=$i
50 j=$(( $j + 1 ))
51done < $tacleNames
52
53echo "Done. Checking for wbinvd module..."
54if [[ ! -f "/proc/wbinvd" ]]; then
55 echo "ERROR: wbinvd module not loaded. Exiting..."
56 exit
57fi
58
59echo "Done. Setting cores $firstCore and $secondCore to 'performance'..."
60echo "performance" > /sys/devices/system/cpu/cpu15/cpufreq/scaling_governor
61echo "performance" > /sys/devices/system/cpu/cpu31/cpufreq/scaling_governo
62
63# Enable L3 isolation
64echo "Done. Enabling L3 isolation..."
65mount -t resctrl resctrl /sys/fs/resctrl
66mkdir -p /sys/fs/resctrl/benchmarks
67echo $1 > /sys/fs/resctrl/benchmarks/cpus_list
68# Reset global bandwith control and remove L3 from global
69echo "L3:0=ffff;1=ffff;2=ffff;3=0000" > /sys/fs/resctrl/schemata
70echo "MB:0=2048;1=2048;2=2048;3=2048" > /sys/fs/resctrl/schemata
71# Alloc L3 to benchmark
72echo "L3:0=0000;1=0000;2=0000;3=ffff" > /sys/fs/resctrl/benchmarks/schemata
73echo "MB:0=2048;1=2048;2=2048;3=2048" > /sys/fs/resctrl/benchmarks/schemata
74echo "Done. Verifying configuration with user..."
75
76# Generate file name string
77# We append to this as we parse the environment settings
78runID=$(date +"%b%d-%H")
79
80# Confirm configuration with user
81echo "=== Global Config ==="
82cat /sys/fs/resctrl/schemata
83echo "=== Core $1 Config ==="
84cat /sys/fs/resctrl/benchmarks/schemata
85if [[ $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
92else
93 runID=$runID-xc
94fi
95if uname -a | grep -q "mc2"; then
96 echo "MC^2 Autodetected. Cache coloring and interleaving will be enabled."
97 runID=$runID-i
98else
99 echo "MC^2 not detected."
100 runID=$runID-xi
101fi
102if pwd | grep -qi dis; then
103 echo "Autodetected DIS. Will use script-level looping."
104fi
105echo "Results will be saved as $runID-$userRunID.txt"
106echo "Press enter to confirm environment, Ctrl-C to exit..."
107read
108
109# Start contending tasks
110if [[ $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 &
119fi
120sleep 1 # Wait for contending tasks to start
121echo "Done. Beginning benchmarks..."
122
123num_tests=$(wc -l < $tacleNames)
124for (( i = 0; i < $num_tests ; i++ ))
125do
126 # If using DIS, we have to iterate in the script as DIS won't do it for us
127 pwd | grep -qi dis
128 iters=$(python3 -c "print(int(not "$?")*("$maxJobs"-1))")
129 for ((k=0;k<=iters;k++)); do
130 # Check if we're using LITMUS^RT or not
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
139 echo COMPLETE: ${tacleProg[$i]}
140done
141
142# End contending tasks
143if [[ $5 == "--contend" ]]; then
144 killall thrasher
145fi
146
147# Put smp_affinty back the way it was
148i=0
149for IRQ in /proc/irq/*
150do
151 if [ -d $IRQ ]; then
152 echo ${irqList[$i]} 2> /dev/null > $IRQ/smp_affinity_list
153 fi
154 i=$(( $i + 1 ))
155done
156
diff --git a/baseline/source/adpcm_dec/adpcm_dec.c b/baseline/source/adpcm_dec/adpcm_dec.c
index 368e98d..0627c9c 100644
--- a/baseline/source/adpcm_dec/adpcm_dec.c
+++ b/baseline/source/adpcm_dec/adpcm_dec.c
@@ -708,12 +708,10 @@ void _Pragma( "entrypoint" ) adpcm_dec_main( void )
708int main(int argc, char **argv) 708int main(int argc, char **argv)