From ec0512af6bbb8ba05eb13fc1aac7754283dd13aa Mon Sep 17 00:00:00 2001 From: Joshua Bakita Date: Tue, 20 Oct 2020 18:20:39 -0400 Subject: Unify unpaired timing scripts for DIS, TACLe, and SD-VBS Now supports specifying an input generation command for each benchmark - see dis/dis2MbInNames.txt for an example. --- dis/bin/field_2mb | 2 -- dis/bin/matrix_2mb | 2 -- dis/bin/neighborhood_2mb | 2 -- dis/bin/pointer_2mb | 2 -- dis/bin/transitive_2mb | 2 -- dis/bin/update_2mb | 2 -- dis/dis2MbInNames.txt | 6 ++++ dis/run_dis.sh | 92 ------------------------------------------------ 8 files changed, 6 insertions(+), 104 deletions(-) delete mode 100755 dis/bin/field_2mb delete mode 100755 dis/bin/matrix_2mb delete mode 100755 dis/bin/neighborhood_2mb delete mode 100755 dis/bin/pointer_2mb delete mode 100755 dis/bin/transitive_2mb delete mode 100755 dis/bin/update_2mb create mode 100644 dis/dis2MbInNames.txt delete mode 100755 dis/run_dis.sh (limited to 'dis') 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 @@ -#!/bin/bash -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 @@ -#!/bin/bash -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 @@ -#!/bin/bash -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 @@ -#!/bin/bash -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 @@ -#!/bin/bash -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 @@ -#!/bin/bash -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 @@ +field ./gen_input.py field inputs/Field/in0 2097152 +matrix ./gen_input.py matrix inputs/Matrix/in0 2097152 +neighborhood ./gen_input.py neighborhood inputs/Neighborhood/in0 2097152 +pointer ./gen_input.py pointer inputs/Pointer/in0 2097152 +transitive ./gen_input.py transitive inputs/Transitive/in0 2097152 +update ./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 @@ -#!/bin/bash - -core=$1 -maxJobs=$2 -runID=$3 -benchmark=${4,} -template_input=inputs/$4/in0 -wss_settings=inputs/WSSS -cache_settings=inputs/caches - -if [ $# -lt 4 ]; then - echo "Usage $0 [template input] [DIS WSS file] [DIS cache file]" - exit -fi - -if [ $# -gt 4 ]; then - echo "Using alternate input template from $5" - template_input=$5 -fi - -if [ $# -gt 5 ]; then - echo "Using alternate WSS settings from $6" - wss_settings=$6 -fi - -if [ $# -gt 6 ]; then - echo "Using alternate cache settings from $7" - cache_settings=$7 -fi - -echo "Making sure that binary is up to date..." -make $benchmark -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 2> /dev/null > $IRQ/smp_affinity_list - fi - i=$(( $i + 1 )) -done - -echo "Done. Checking for wbinvd module..." -if [[ ! -f "/proc/wbinvd" ]]; then - echo "ERROR: wbinvd module not loaded. Exiting..." - exit -fi - -# Enable L3 isolation -echo "Done. Enabling L3 isolation..." -mount -t resctrl resctrl /sys/fs/resctrl -mkdir -p /sys/fs/resctrl/benchmarks -echo $1 > /sys/fs/resctrl/benchmarks/cpus_list -# Reset global bandwith control and remove L3 from global -echo "L3:0=ffff;1=ffff;2=ffff;3=0000" > /sys/fs/resctrl/schemata -echo "MB:0=2048;1=2048;2=2048;3=2048" > /sys/fs/resctrl/schemata -# Alloc L3 to benchmark -echo "L3:0=0000;1=0000;2=0000;3=ffff" > /sys/fs/resctrl/benchmarks/schemata -echo "MB:0=2048;1=2048;2=2048;3=2048" > /sys/fs/resctrl/benchmarks/schemata -echo "Done. Beginning benchmarks..." - -# Execute the benchmark for each WSS and cache config -while read j; do - echo $j > /sys/fs/resctrl/benchmarks/schemata - while read i; do - if grep -q "#define LITMUS 1" ../baseline/source/extra.h; then - echo "Using LITMUS-RT!" - ./gen_input.py $benchmark $template_input $i | numactl -m 0 ./$benchmark $benchmark-$i-$j $maxJobs $core $runID 1 - else - ./gen_input.py $benchmark $template_input $i | chrt -r 97 numactl -m 0 taskset -c $core ./$benchmark $benchmark-$i-$j $maxJobs $core $runID 1 - fi - done < $wss_settings -done < $cache_settings - -# Put IRQs back as they were -i=0 -for IRQ in /proc/irq/* -do - if [ -d $IRQ ]; then - echo ${irqList[$i]} 2> /dev/null > $IRQ/smp_affinity_list - fi - i=$(( $i + 1 )) -done - -- cgit v1.2.2