diff options
Diffstat (limited to 'dis/run_dis.sh')
| -rwxr-xr-x | dis/run_dis.sh | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/dis/run_dis.sh b/dis/run_dis.sh index 3e82bfb..78745ec 100755 --- a/dis/run_dis.sh +++ b/dis/run_dis.sh | |||
| @@ -4,7 +4,7 @@ core=$1 | |||
| 4 | maxJobs=$2 | 4 | maxJobs=$2 |
| 5 | runID=$3 | 5 | runID=$3 |
| 6 | benchmark=${4,} | 6 | benchmark=${4,} |
| 7 | template_input=inputs/$4/in1 | 7 | template_input=inputs/$4/in0 |
| 8 | wss_settings=inputs/WSSS | 8 | wss_settings=inputs/WSSS |
| 9 | cache_settings=inputs/caches | 9 | cache_settings=inputs/caches |
| 10 | 10 | ||
| @@ -36,7 +36,6 @@ echo "Done. Disabling real-time throttling..." | |||
| 36 | echo -1 > /proc/sys/kernel/sched_rt_runtime_us | 36 | echo -1 > /proc/sys/kernel/sched_rt_runtime_us |
| 37 | echo "Done. Redirecting all interrupts to core 0..." | 37 | echo "Done. Redirecting all interrupts to core 0..." |
| 38 | 38 | ||
| 39 | # TODO: Make this cleaner | ||
| 40 | # Redirect all interrupts to core 0 | 39 | # Redirect all interrupts to core 0 |
| 41 | i=0 | 40 | i=0 |
| 42 | for IRQ in /proc/irq/* | 41 | for IRQ in /proc/irq/* |
| @@ -44,27 +43,39 @@ do | |||
| 44 | # Skip default_smp_affinity | 43 | # Skip default_smp_affinity |
| 45 | if [ -d $IRQ ]; then | 44 | if [ -d $IRQ ]; then |
| 46 | irqList[$i]=$(cat $IRQ/smp_affinity_list) | 45 | irqList[$i]=$(cat $IRQ/smp_affinity_list) |
| 47 | echo 0 > $IRQ/smp_affinity_list | 46 | echo 0 2> /dev/null > $IRQ/smp_affinity_list |
| 48 | fi | 47 | fi |
| 49 | i=$(( $i + 1 )) | 48 | i=$(( $i + 1 )) |
| 50 | done | 49 | done |
| 51 | echo "Done. Beginning benchmarks..." | ||
| 52 | 50 | ||
| 53 | # Setup cache control group | 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..." | ||
| 54 | mount -t resctrl resctrl /sys/fs/resctrl | 59 | mount -t resctrl resctrl /sys/fs/resctrl |
| 55 | mkdir /sys/fs/resctrl/benchmarks | 60 | mkdir -p /sys/fs/resctrl/benchmarks |
| 56 | sleep 1 # Wait a second for the group to initialize | 61 | echo $1 > /sys/fs/resctrl/benchmarks/cpus_list |
| 57 | echo $core > /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..." | ||
| 58 | 69 | ||
| 59 | # Execute the benchmark for each WSS and cache config | 70 | # Execute the benchmark for each WSS and cache config |
| 60 | while read j; do | 71 | while read j; do |
| 61 | echo $j > /sys/fs/resctrl/benchmarks/schemata | 72 | echo $j > /sys/fs/resctrl/benchmarks/schemata |
| 62 | while read i; do | 73 | while read i; do |
| 63 | if grep -q "#define LITMUS 1" ../../baseline/source/extra.h; then | 74 | if grep -q "#define LITMUS 1" ../baseline/source/extra.h; then |
| 64 | echo "Using LITMUS-RT!" | 75 | echo "Using LITMUS-RT!" |
| 65 | ./gen_input.py $benchmark $template_input $i | ./$benchmark $benchmark-$i-$j $maxJobs $core $runID 1 | 76 | ./gen_input.py $benchmark $template_input $i | numactl -m 0 ./$benchmark $benchmark-$i-$j $maxJobs $core $runID 1 |
| 66 | else | 77 | else |
| 67 | ./gen_input.py $benchmark $template_input $i | chrt -r 97 taskset -c $core ./$benchmark $benchmark-$i-$j $maxJobs $core $runID 1 | 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 |
| 68 | fi | 79 | fi |
| 69 | done < $wss_settings | 80 | done < $wss_settings |
| 70 | done < $cache_settings | 81 | done < $cache_settings |
| @@ -74,7 +85,7 @@ i=0 | |||
| 74 | for IRQ in /proc/irq/* | 85 | for IRQ in /proc/irq/* |
| 75 | do | 86 | do |
| 76 | if [ -d $IRQ ]; then | 87 | if [ -d $IRQ ]; then |
| 77 | echo ${irqList[$i]} > $IRQ/smp_affinity_list | 88 | echo ${irqList[$i]} 2> /dev/null > $IRQ/smp_affinity_list |
| 78 | fi | 89 | fi |
| 79 | i=$(( $i + 1 )) | 90 | i=$(( $i + 1 )) |
| 80 | done | 91 | done |
