diff options
| author | leochanj105 <leochanj@live.unc.edu> | 2020-10-23 02:12:49 -0400 |
|---|---|---|
| committer | leochanj105 <leochanj@live.unc.edu> | 2020-10-23 02:12:49 -0400 |
| commit | e23e931be4776b89149fdb2596f47096e6cdb78c (patch) | |
| tree | faf3963cc501f103cd2554553ec74ce21157b42e /dis | |
| parent | e2d933df44b7b387b41c8c7805393ad3857c4448 (diff) | |
| parent | e0217a963c6c0e0667d41d075038685956bcfacf (diff) | |
Merge branch 'sd-vbs' of ssh://rtsrv.cs.unc.edu/public/mc2-scripts-and-benchmarks into sd-vbs
Diffstat (limited to 'dis')
| -rwxr-xr-x | dis/Makefile | 8 | ||||
| -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 | ||||
| -rw-r--r-- | dis/disPairs2MbInNames.txt | 6 | ||||
| -rwxr-xr-x | dis/run_dis.sh | 92 | ||||
| -rwxr-xr-x | dis/setup_mem_and_global.sh | 22 | ||||
| -rwxr-xr-x | dis/summarize.py | 69 |
12 files changed, 16 insertions, 199 deletions
diff --git a/dis/Makefile b/dis/Makefile index df93116..77e0b8a 100755 --- a/dis/Makefile +++ b/dis/Makefile | |||
| @@ -2,9 +2,9 @@ | |||
| 2 | # Build the DIS benchmarks with all-pairs or unpaired instrumentation | 2 | # Build the DIS benchmarks with all-pairs or unpaired instrumentation |
| 3 | # (I know that this Makefile is mildly evil and breaks so many rules | 3 | # (I know that this Makefile is mildly evil and breaks so many rules |
| 4 | # that a good Makefile should follow. Sorry - at least I have one.) | 4 | # that a good Makefile should follow. Sorry - at least I have one.) |
| 5 | LIBLITMUS ?= /media/speedy/litmus/liblitmus | 5 | LIBLITMUS ?= /home/litmus/liblitmus |
| 6 | CC ?= gcc | 6 | CC ?= gcc |
| 7 | CFLAGS += -pthread -O2 -I.. | 7 | override CFLAGS += -pthread -O2 -I.. |
| 8 | LDFLAGS = -lrt -lm | 8 | LDFLAGS = -lrt -lm |
| 9 | COMMON = ../extra.h | 9 | COMMON = ../extra.h |
| 10 | 10 | ||
| @@ -15,8 +15,8 @@ endif | |||
| 15 | 15 | ||
| 16 | # Include all the LITMUS^RT headers if we're using it | 16 | # Include all the LITMUS^RT headers if we're using it |
| 17 | ifneq ($(shell grep "define LITMUS 1" ../extra.h),) | 17 | ifneq ($(shell grep "define LITMUS 1" ../extra.h),) |
| 18 | CFLAGS += -I${LIBLITMUS}/include -I${LIBLITMUS}/arch/arm/include | 18 | override CFLAGS += -I${LIBLITMUS}/include -I${LIBLITMUS}/arch/arm/include |
| 19 | LDFLAGS += -L${LIBLITMUS} -llitmus | 19 | override LDFLAGS += -L${LIBLITMUS} -llitmus |
| 20 | endif | 20 | endif |
| 21 | 21 | ||
| 22 | all: baseline | 22 | all: baseline |
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/disPairs2MbInNames.txt b/dis/disPairs2MbInNames.txt new file mode 100644 index 0000000..a45ead4 --- /dev/null +++ b/dis/disPairs2MbInNames.txt | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | field_all ./gen_input.py field inputs/Field/in0 2097152 | ||
| 2 | matrix_all ./gen_input.py matrix inputs/Matrix/in0 2097152 | ||
| 3 | neighborhood_all ./gen_input.py neighborhood inputs/Neighborhood/in0 2097152 | ||
| 4 | pointer_all ./gen_input.py pointer inputs/Pointer/in0 2097152 | ||
| 5 | transitive_all ./gen_input.py transitive inputs/Transitive/in0 2097152 | ||
| 6 | update_all ./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/dis/setup_mem_and_global.sh b/dis/setup_mem_and_global.sh deleted file mode 100755 index 6bddb2f..0000000 --- a/dis/setup_mem_and_global.sh +++ /dev/null | |||
| @@ -1,22 +0,0 @@ | |||
| 1 | # Setup group | ||
| 2 | mount -t resctrl resctrl /sys/fs/resctrl | ||
| 3 | mkdir -p /sys/fs/resctrl/benchmarks | ||
| 4 | echo 15 > /sys/fs/resctrl/benchmarks/cpus_list | ||
| 5 | echo 31 > /sys/fs/resctrl/benchmarks/cpus_list | ||
| 6 | # Remove mem from global domain and assign to local | ||
| 7 | echo "L3:0=ffff;1=ffff;2=ffff;3=0000" > /sys/fs/resctrl/schemata | ||
| 8 | echo "L3:0=ffff;1=ffff;2=ffff;3=ffff" > /sys/fs/resctrl/benchmarks/schemata | ||
| 9 | if [[ $1 == "--bandwith" ]]; then | ||
| 10 | # Remove bandwidth from global domain | ||
| 11 | echo "MB:0=2;1=2;2=2;3=2" > /sys/fs/resctrl/schemata | ||
| 12 | echo "MB:0=2048;1=2048;2=2048;3=2048" > /sys/fs/resctrl/benchmarks/schemata | ||
| 13 | else | ||
| 14 | # Disable bandwidth control | ||
| 15 | echo "MB:0=2048;1=2048;2=2048;3=2048" > /sys/fs/resctrl/schemata | ||
| 16 | echo "MB:0=2048;1=2048;2=2048;3=2048" > /sys/fs/resctrl/benchmarks/schemata | ||
| 17 | fi | ||
| 18 | echo "=== Global Config ===" | ||
| 19 | cat /sys/fs/resctrl/schemata | ||
| 20 | echo "=== Core 15 & 31 Config ===" | ||
| 21 | cat /sys/fs/resctrl/benchmarks/schemata | ||
| 22 | |||
diff --git a/dis/summarize.py b/dis/summarize.py deleted file mode 100755 index 31dcccc..0000000 --- a/dis/summarize.py +++ /dev/null | |||
| @@ -1,69 +0,0 @@ | |||
| 1 | #!/usr/bin/python3 | ||
| 2 | import sys | ||
| 3 | |||
| 4 | f = sys.argv[1] | ||
| 5 | if len(sys.argv) < 2: | ||
| 6 | print("Usage "+sys.argv[0]+" <filename&g | ||
