From ecf6547fdce39b3ec0f333c9b391b0f1c25deba5 Mon Sep 17 00:00:00 2001 From: Joshua Bakita Date: Sat, 17 Oct 2020 21:22:08 -0400 Subject: All the DIS runner scripts as used for the (rejected) RTSS'20 submission DANGER! There's an inconsistency in the input files used for the all-pairs tests and those used for the baseline tests. Baselines: run_all_dis.sh calls run_dis.sh to do all baselines. All-pairs: Uses old TACLe script (not included here). Cache allocation 2nd-order effects on SMT friendliness: run_pair_convexity.sh --- dis/run_dis.sh | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) (limited to 'dis/run_dis.sh') 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 maxJobs=$2 runID=$3 benchmark=${4,} -template_input=inputs/$4/in1 +template_input=inputs/$4/in0 wss_settings=inputs/WSSS cache_settings=inputs/caches @@ -36,7 +36,6 @@ echo "Done. Disabling real-time throttling..." echo -1 > /proc/sys/kernel/sched_rt_runtime_us echo "Done. Redirecting all interrupts to core 0..." -# TODO: Make this cleaner # Redirect all interrupts to core 0 i=0 for IRQ in /proc/irq/* @@ -44,27 +43,39 @@ do # Skip default_smp_affinity if [ -d $IRQ ]; then irqList[$i]=$(cat $IRQ/smp_affinity_list) - echo 0 > $IRQ/smp_affinity_list + echo 0 2> /dev/null > $IRQ/smp_affinity_list fi i=$(( $i + 1 )) done -echo "Done. Beginning benchmarks..." -# Setup cache control group +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 /sys/fs/resctrl/benchmarks -sleep 1 # Wait a second for the group to initialize -echo $core > /sys/fs/resctrl/benchmarks/cpus_list +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 + if grep -q "#define LITMUS 1" ../baseline/source/extra.h; then echo "Using LITMUS-RT!" - ./gen_input.py $benchmark $template_input $i | ./$benchmark $benchmark-$i-$j $maxJobs $core $runID 1 + ./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 taskset -c $core ./$benchmark $benchmark-$i-$j $maxJobs $core $runID 1 + ./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 @@ -74,7 +85,7 @@ i=0 for IRQ in /proc/irq/* do if [ -d $IRQ ]; then - echo ${irqList[$i]} > $IRQ/smp_affinity_list + echo ${irqList[$i]} 2> /dev/null > $IRQ/smp_affinity_list fi i=$(( $i + 1 )) done -- cgit v1.2.2