blob: f7a98fa0b03cbce4c79fec4f966f737b234e2d67 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
#!/bin/bash
core=$1
maxJobs=$2
runID=$3
tacleNames=tacleNames.txt
if [ $# -lt 3 ]; then
echo "Usage $0 <core ID> <number of iterations> <run ID> [TACLe names file]"
exit
fi
if [ $# -gt 3 ]; then
echo "Using alternate list of TACLe benchmarks from $4"
tacleNames=$4
fi
echo "Making sure that binaries are up to date..."
while read i; do
make bin/$i
done < $tacleNames
echo "Done. Disabling real-time throttling..."
# Turn off rt throttling
echo -1 > /proc/sys/kernel/sched_rt_runtime_us
echo "Done. Redirecting all interrupts to core 0..."
# Redirect all interrupts to core 0
i=0
for IRQ in /proc/irq/*
do
# Skip default_smp_affinity
if [ -d $IRQ ]; then
irqList[$i]=$(cat $IRQ/smp_affinity_list)
echo 0 > $IRQ/smp_affinity_list
fi
i=$(( $i + 1 ))
done
echo "Done. Beginning benchmarks..."
# Read the names of each benchmark
j=0
while read i; do
tacleProg[$j]=$i
j=$(( $j + 1 ))
done < $tacleNames
num_tests=$(wc -l < $tacleNames)
for (( i = 0; i < $num_tests ; i++ ))
do
# Check if we're using LITMUS^RT or not
if grep -q "#define LITMUS 1" source/extra.h; then
./bin/${tacleProg[$i]} ${tacleProg[$i]} $maxJobs $core $runID 1
else
chrt -r 97 taskset -c $core ./bin/${tacleProg[$i]} ${tacleProg[$i]} $maxJobs $core $runID 1
fi
echo COMPLETE: ${tacleProg[$i]}
done
# Put smp_affinty back the way it was
i=0
for IRQ in /proc/irq/*
do
if [ -d $IRQ ]; then
echo ${irqList[$i]} > $IRQ/smp_affinity_list
fi
i=$(( $i + 1 ))
done
|