From edfb01f94b56fcc3e3bc7098e233fcbbb862b462 Mon Sep 17 00:00:00 2001 From: leochanj105 Date: Thu, 28 Oct 2021 11:15:36 -0400 Subject: fix stitch and loc, added flush --- run_case_study_dag.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'run_case_study_dag.py') diff --git a/run_case_study_dag.py b/run_case_study_dag.py index df44cb4..716c89b 100755 --- a/run_case_study_dag.py +++ b/run_case_study_dag.py @@ -107,6 +107,7 @@ def main(pathName): ccx = core // 4 in_ccx = core % 4 mask = "0000" + # mask = "ffff" mask = mask[:in_ccx] +'f'+ mask[in_ccx+1:] run('echo {},{} > /sys/fs/resctrl/core-{}/cpus_list'.format(core,core+16, core)) # run('echo {} > /sys/fs/resctrl/core-{}/cpus_list'.format(core, core)) @@ -156,7 +157,7 @@ def main(pathName): if launch[0] == '0': if LITMUS: binary = binary_path + binary_name + "_single" - # Arg format: + # Arg format: arg = " " + task_name + " " + num_iters +" " + core_num +" " + run_id +" " + save_result+" " + period +" " + crt_level + " "+ phase + " " + cost + " " + deadline bench_tsk = subprocess.Popen(input_cmd[binary_name] + " | numactl --interleave=all " + binary + arg, shell=True, executable='/bin/bash', stderr=stderr_file) @@ -173,7 +174,7 @@ def main(pathName): if not pid_str: print("Unable to launch {} as a solo task! Exiting...".format(task_name)) return 1 - run("echo " + pid_str + " > /sys/fs/resctrl/core-" + str(phys_core) + "/tasks") + # run("echo " + pid_str + " > /sys/fs/resctrl/core-" + str(phys_core) + "/tasks") else: # Paried tasks other_binary_name = launch[OTHER_BINARY_NAME].strip() @@ -193,7 +194,7 @@ def main(pathName): if LITMUS: binary = binary_path + binary_name + "_pair" other_binary = binary_path + other_binary_name + "_pair" - # Arg format: <0 other core> + # Arg format: <0 other core> arg1 = " " + task_name + " " + num_iters +" " + core_num +" " + other_core_num+" "+ other_task_name+" "+ run_id +" " + save_result+" " +str(pairID) +" "+ period +" " + crt_level +" "+phase + " " + cost + " " + deadline arg2 = " " + other_task_name + " " + num_iters +" " + other_core_num +" " + core_num+" "+ task_name+" "+ run_id +" " + save_result+" " +str(pairID) +" "+ period +" " + crt_level+" " +phase + " " + other_cost + " " + other_deadline # print(input_cmd[binary_name] + " | numactl --membind=0 " + binary + arg1) @@ -207,7 +208,7 @@ def main(pathName): arg1 = " " + task_name + " " + num_iters +" " + core_num +" " + other_core_num+" "+ other_task_name+" "+ run_id +" " + save_result+" " +str(pairID) arg2 = " " + other_task_name + " " + num_iters +" " + other_core_num +" " + core_num+" "+ task_name+" "+ run_id +" " + save_result+" " +str(pairID) bench_tsk1 = subprocess.Popen(input_cmd[binary_name] + " | numactl --membind=0 taskset -c " + core_num + " " + binary + arg1, shell=True, executable='/bin/bash', stderr=stderr_file) - bench_tsk2 = subprocess.Popen(input_cmd[other_binary_name] + " | numactl --membind=1 taskset -c " + core_num + " " + other_binary + arg2, shell=True, executable='/bin/bash', stderr=stderr_file) + bench_tsk2 = subprocess.Popen(input_cmd[other_binary_name] + " | numactl --membind=1 taskset -c " + other_core_num + " " + other_binary + arg2, shell=True, executable='/bin/bash', stderr=stderr_file) # print(binary + " " + task_name,other_binary + " " +other_task_name) pid1_str = ID2PID(binary + " " + task_name) pid2_str = ID2PID(other_binary + " " +other_task_name) @@ -215,8 +216,8 @@ def main(pathName): print("Unable to launch {} and {} in a pair! Exiting...".format(task_name, other_task_name)) return 1 - run("echo " + pid1_str + " > /sys/fs/resctrl/core-" + str(phys_core) + "/tasks") - run("echo " + pid2_str + " > /sys/fs/resctrl/core-" + str(phys_core) + "/tasks") + # run("echo " + pid1_str + " > /sys/fs/resctrl/core-" + str(phys_core) + "/tasks") + # run("echo " + pid2_str + " > /sys/fs/resctrl/core-" + str(phys_core) + "/tasks") # run("wait " + pid1_str) # run("wait " + pid2_str) pairID += 1 -- cgit v1.2.2