summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--SD-VBS/benchmarks/stitch/src/c/script_stitch.c12
-rwxr-xr-xall_pairs/bin/anagrambin0 -> 184928 bytes
-rwxr-xr-xall_pairs/bin/audiobeambin0 -> 128912 bytes
-rwxr-xr-xall_pairs/bin/g723_encbin0 -> 101664 bytes
-rwxr-xr-xall_pairs/bin/huff_decbin0 -> 95960 bytes
-rwxr-xr-xbaseline/bin/anagrambin0 -> 179680 bytes
-rwxr-xr-xbaseline/bin/audiobeambin0 -> 123664 bytes
-rwxr-xr-xbaseline/bin/g723_encbin0 -> 100504 bytes
-rwxr-xr-xbaseline/bin/huff_decbin0 -> 94792 bytes
-rw-r--r--dis/sudo180
-rw-r--r--extra.h2
-rw-r--r--run_case_study.py52
-rw-r--r--sudo1
13 files changed, 222 insertions, 25 deletions
diff --git a/SD-VBS/benchmarks/stitch/src/c/script_stitch.c b/SD-VBS/benchmarks/stitch/src/c/script_stitch.c
index 9310048..472e231 100644
--- a/SD-VBS/benchmarks/stitch/src/c/script_stitch.c
+++ b/SD-VBS/benchmarks/stitch/src/c/script_stitch.c
@@ -23,12 +23,6 @@ int main(int argc, char* argv[])
23 cols = Icur->width; 23 cols = Icur->width;
24 24
25 for_each_job { 25 for_each_job {
26 iFreeHandle(Icur);
27 fFreeHandle(v);
28 fFreeHandle(interestPnts);
29 fFreeHandle(int1);
30 fFreeHandle(int2);
31 fFreeHandle(Fcur);
32 v = harris(Icur); 26 v = harris(Icur);
33 interestPnts = getANMS(v, 24); 27 interestPnts = getANMS(v, 24);
34 int1 = fMallocHandle(interestPnts->height, 1); 28 int1 = fMallocHandle(interestPnts->height, 1);
@@ -40,6 +34,12 @@ int main(int argc, char* argv[])
40 } 34 }
41 35
42 Fcur = extractFeatures(Icur, int1, int2); 36 Fcur = extractFeatures(Icur, int1, int2);
37 iFreeHandle(Icur);
38 fFreeHandle(v);
39 fFreeHandle(interestPnts);
40 fFreeHandle(int1);
41 fFreeHandle(int2);
42 fFreeHandle(Fcur);
43 } 43 }
44 44
45#ifdef CHECK 45#ifdef CHECK
diff --git a/all_pairs/bin/anagram b/all_pairs/bin/anagram
new file mode 100755
index 0000000..4d3b54e
--- /dev/null
+++ b/all_pairs/bin/anagram
Binary files differ
diff --git a/all_pairs/bin/audiobeam b/all_pairs/bin/audiobeam
new file mode 100755
index 0000000..5d00fa1
--- /dev/null
+++ b/all_pairs/bin/audiobeam
Binary files differ
diff --git a/all_pairs/bin/g723_enc b/all_pairs/bin/g723_enc
new file mode 100755
index 0000000..7ab3acb
--- /dev/null
+++ b/all_pairs/bin/g723_enc
Binary files differ
diff --git a/all_pairs/bin/huff_dec b/all_pairs/bin/huff_dec
new file mode 100755
index 0000000..b638a87
--- /dev/null
+++ b/all_pairs/bin/huff_dec
Binary files differ
diff --git a/baseline/bin/anagram b/baseline/bin/anagram
new file mode 100755
index 0000000..be58ec0
--- /dev/null
+++ b/baseline/bin/anagram
Binary files differ
diff --git a/baseline/bin/audiobeam b/baseline/bin/audiobeam
new file mode 100755
index 0000000..cf776b4
--- /dev/null
+++ b/baseline/bin/audiobeam
Binary files differ
diff --git a/baseline/bin/g723_enc b/baseline/bin/g723_enc
new file mode 100755
index 0000000..7289895
--- /dev/null
+++ b/baseline/bin/g723_enc
Binary files differ
diff --git a/baseline/bin/huff_dec b/baseline/bin/huff_dec
new file mode 100755
index 0000000..07d4d32
--- /dev/null
+++ b/baseline/bin/huff_dec
Binary files differ
diff --git a/dis/sudo b/dis/sudo
new file mode 100644
index 0000000..134ad48
--- /dev/null
+++ b/dis/sudo
@@ -0,0 +1,180 @@
12097152 -1 35 80
2
31 1 22 1 c2 1 2d 0
41 1 22 1 c2 1 2d 0
51 1 22 1 c2 1 2d 0
61 1 22 1 c2 1 2d 0
71 1 22 1 c2 1 2d 0
81 1 22 1 c2 1 2d 0
91 1 22 1 c2 1 2d 0
101 1 22 1 c2 1 2d 0
111 1 22 1 c2 1 2d 0
121 1 22 1 c2 1 2d 0
13
141 1 22 1 c2 1 2d 0
151 1 22 1 c2 1 2d 0
161 1 22 1 c2 1 2d 0
171 1 22 1 c2 1 2d 0
181 1 22 1 c2 1 2d 0
191 1 22 1 c2 1 2d 0
201 1 22 1 c2 1 2d 0
211 1 22 1 c2 1 2d 0
221 1 22 1 c2 1 2d 0
231 1 22 1 c2 1 2d 0
24
251 1 22 1 c2 1 2d 0
261 1 22 1 c2 1 2d 0
271 1 22 1 c2 1 2d 0
281 1 22 1 c2 1 2d 0
291 1 22 1 c2 1 2d 0
301 1 22 1 c2 1 2d 0
311 1 22 1 c2 1 2d 0
321 1 22 1 c2 1 2d 0
331 1 22 1 c2 1 2d 0
341 1 22 1 c2 1 2d 0
35
361 1 22 1 c2 1 2d 0
371 1 22 1 c2 1 2d 0
381 1 22 1 c2 1 2d 0
391 1 22 1 c2 1 2d 0
401 1 22 1 c2 1 2d 0
411 1 22 1 c2 1 2d 0
421 1 22 1 c2 1 2d 0
431 1 22 1 c2 1 2d 0
441 1 22 1 c2 1 2d 0
451 1 22 1 c2 1 2d 0
46
47
481 1 22 1 c2 1 2d 0
491 1 22 1 c2 1 2d 0
501 1 22 1 c2 1 2d 0
511 1 22 1 c2 1 2d 0
521 1 22 1 c2 1 2d 0
531 1 22 1 c2 1 2d 0
541 1 22 1 c2 1 2d 0
551 1 22 1 c2 1 2d 0
561 1 22 1 c2 1 2d 0
571 1 22 1 c2 1 2d 0
58
591 1 22 1 c2 1 2d 0
601 1 22 1 c2 1 2d 0
611 1 22 1 c2 1 2d 0
621 1 22 1 c2 1 2d 0
631 1 22 1 c2 1 2d 0
641 1 22 1 c2 1 2d 0
651 1 22 1 c2 1 2d 0
661 1 22 1 c2 1 2d 0
671 1 22 1 c2 1 2d 0
681 1 22 1 c2 1 2d 0
69
701 1 22 1 c2 1 2d 0
711 1 22 1 c2 1 2d 0
721 1 22 1 c2 1 2d 0
731 1 22 1 c2 1 2d 0
741 1 22 1 c2 1 2d 0
751 1 22 1 c2 1 2d 0
761 1 22 1 c2 1 2d 0
771 1 22 1 c2 1 2d 0
781 1 22 1 c2 1 2d 0
791 1 22 1 c2 1 2d 0
80
811 1 22 1 c2 1 2d 0
821 1 22 1 c2 1 2d 0
831 1 22 1 c2 1 2d 0
841 1 22 1 c2 1 2d 0
851 1 22 1 c2 1 2d 0
861 1 22 1 c2 1 2d 0
871 1 22 1 c2 1 2d 0
881 1 22 1 c2 1 2d 0
891 1 22 1 c2 1 2d 0
901 1 22 1 c2 1 2d 0
91
921 1 22 1 c2 1 2d 0
931 1 22 1 c2 1 2d 0
941 1 22 1 c2 1 2d 0
951 1 22 1 c2 1 2d 0
961 1 22 1 c2 1 2d 0
971 1 22 1 c2 1 2d 0
981 1 22 1 c2 1 2d 0
991 1 22 1 c2 1 2d 0
1001 1 22 1 c2 1 2d 0
1011 1 22 1 c2 1 2d 0
102
1031 1 22 1 c2 1 2d 0
1041 1 22 1 c2 1 2d 0
1051 1 22 1 c2 1 2d 0
1061 1 22 1 c2 1 2d 0
1071 1 22 1 c2 1 2d 0
1081 1 22 1 c2 1 2d 0
1091 1 22 1 c2 1 2d 0
1101 1 22 1 c2 1 2d 0
1111 1 22 1 c2 1 2d 0
1121 1 22 1 c2 1 2d 0
113
1141 1 22 1 c2 1 2d 0
1151 1 22 1 c2 1 2d 0
1161 1 22 1 c2 1 2d 0
1171 1 22 1 c2 1 2d 0
1181 1 22 1 c2 1 2d 0
1191 1 22 1 c2 1 2d 0
1201 1 22 1 c2 1 2d 0
1211 1 22 1 c2 1 2d 0
1221 1 22 1 c2 1 2d 0
1231 1 22 1 c2 1 2d 0
124
1251 1 22 1 c2 1 2d 0
1261 1 22 1 c2 1 2d 0
1271 1 22 1 c2 1 2d 0
1281 1 22 1 c2 1 2d 0
1291 1 22 1 c2 1 2d 0
1301 1 22 1 c2 1 2d 0
1311 1 22 1 c2 1 2d 0
1321 1 22 1 c2 1 2d 0
1331 1 22 1 c2 1 2d 0
1341 1 22 1 c2 1 2d 0
135
1361 1 22 1 c2 1 2d 0
1371 1 22 1 c2 1 2d 0
1381 1 22 1 c2 1 2d 0
1391 1 22 1 c2 1 2d 0
1401 1 22 1 c2 1 2d 0
1411 1 22 1 c2 1 2d 0
1421 1 22 1 c2 1 2d 0
1431 1 22 1 c2 1 2d 0
1441 1 22 1 c2 1 2d 0
1451 1 22 1 c2 1 2d 0
146
1471 1 22 1 c2 1 2d 0
1481 1 22 1 c2 1 2d 0
1491 1 22 1 c2 1 2d 0
1501 1 22 1 c2 1 2d 0
1511 1 22 1 c2 1 2d 0
1521 1 22 1 c2 1 2d 0
1531 1 22 1 c2 1 2d 0
1541 1 22 1 c2 1 2d 0
1551 1 22 1 c2 1 2d 0
1561 1 22 1 c2 1 2d 0
157
1581 1 22 1 c2 1 2d 0
1591 1 22 1 c2 1 2d 0
1601 1 22 1 c2 1 2d 0
1611 1 22 1 c2 1 2d 0
1621 1 22 1 c2 1 2d 0
1631 1 22 1 c2 1 2d 0
1641 1 22 1 c2 1 2d 0
1651 1 22 1 c2 1 2d 0
1661 1 22 1 c2 1 2d 0
1671 1 22 1 c2 1 2d 0
168
1691 1 22 1 c2 1 2d 0
1701 1 22 1 c2 1 2d 0
1711 1 22 1 c2 1 2d 0
1721 1 22 1 c2 1 2d 0
1731 1 22 1 c2 1 2d 0
1741 1 22 1 c2 1 2d 0
1751 1 22 1 c2 1 2d 0
1761 1 22 1 c2 1 2d 0
1771 1 22 1 c2 1 2d 0
1781 1 22 1 c2 1 2d 0
179
180
diff --git a/extra.h b/extra.h
index 990d2e0..623cdcb 100644
--- a/extra.h
+++ b/extra.h
@@ -120,7 +120,7 @@ static void _rt_load_params_itrl(int argc, char **argv) {
120 _rt_will_output = atoi(argv[7]); 120 _rt_will_output = atoi(argv[7]);
121 char *pairId; 121 char *pairId;
122 int end; 122 int end;
123 if (argc > 8) { 123 if (argc > 7) {
124 pairId = argv[8]; 124 pairId = argv[8];
125 end = 9; 125 end = 9;
126 } else { 126 } else {
diff --git a/run_case_study.py b/run_case_study.py
index f5a4f61..d2a3922 100644
--- a/run_case_study.py
+++ b/run_case_study.py
@@ -3,6 +3,13 @@ import sys
3import re 3import re
4import csv 4import csv
5import subprocess 5import subprocess
6<<<<<<< HEAD
7def run(command):
8 print(command)
9 os.system(command)
10
11=======
12>>>>>>> rtas20-wip
6def main(): 13def main():
7 pathName = sys.argv[1] 14 pathName = sys.argv[1]
8 tacle_pairs_path = "./all_pairs" 15 tacle_pairs_path = "./all_pairs"
@@ -48,7 +55,7 @@ def main():
48 ccx = "1" 55 ccx = "1"
49 else: 56 else:
50 ccx = "0" 57 ccx = "0"
51 continue 58 continue
52 if(row[0] != "task id" and row[0] != ""): 59 if(row[0] != "task id" and row[0] != ""):
53 row.append(ccx) 60 row.append(ccx)
54 if(threaded): 61 if(threaded):
@@ -56,7 +63,9 @@ def main():
56 else: 63 else:
57 row.append("s") 64 row.append("s")
58 levelC.append(row) 65 levelC.append(row)
59 #os.system('echo "L3:0=L3:0=0000,1=0000,2=0000,3=0000" > /sys/fs/resctrl/schemata') 66 line += 1
67 #os.system('mount -t resctrl resctrl /sys/fs/resctrl')
68 run('sudo echo "L3:0=0000,1=0000,2=0000,3=0000" > sudo /sys/fs/resctrl/schemata')
60 69
61 with open(pathName+"/l3alloc.csv", "r") as csv_file: 70 with open(pathName+"/l3alloc.csv", "r") as csv_file:
62 csv_reader = csv.reader(csv_file, delimiter = ',') 71 csv_reader = csv.reader(csv_file, delimiter = ',')
@@ -69,17 +78,19 @@ def main():
69 way_C = int(row[3]) 78 way_C = int(row[3])
70 # Level C allocation 79 # Level C allocation
71 if(core == 1): 80 if(core == 1):
72 os.system("mkdir /sys/fs/resctrl/level-c-ccx-0") 81 run("mkdir -p /sys/fs/resctrl/level-c-ccx-0")
73 os.system('echo "L3:0=' + ("%0.4x" % (int("1"*way_C, 2))) + ',1=0000,2=0000,3=0000" > /sys/fs/resctrl/level-c-ccx-0/schemata') 82 run('sudo echo "L3:0=' + ("%0.4x" % (int("1"*way_C, 2))) + ',1=0000,2=0000,3=0000" > sudo /sys/fs/resctrl/level-c-ccx-0/schemata')
74 83
75 if(core == 4): 84 if(core == 4):
76 os.system("mkdir /sys/fs/resctrl/level-c-ccx-1") 85 run("mkdir -p /sys/fs/resctrl/level-c-ccx-1")
77 os.system('echo "L3:0=0000, 1=' + ("%0.4x" % (int("1"*way_C, 2))) + ',2=0000,3=0000" > /sys/fs/resctrl/level-c-ccx-1/schemata') 86 run('sudo echo "L3:0=0000, 1=' + ("%0.4x" % (int("1"*way_C, 2))) + ',2=0000,3=0000" > sudo /sys/fs/resctrl/level-c-ccx-1/schemata')
78 os.system('mkdir /sys/fs/resctrl/level-ab-core-' + core) 87 run('mkdir -p /sys/fs/resctrl/level-ab-core-' + str(core))
79 if(core < 4): 88 if(core < 4):
80 os.system('echo "L3:0=' + ("%0.4x" % (int("1"*way_C + "0"*(16-way_AB), 2))) + ',1=0000,2=0000,3=0000" > /sys/fs/resctrl/level-ab-core-' + core + '/schemata') 89 run('sudo echo "L3:0=' + ("%0.4x" % (int("1"*way_AB + "0"*(16-way_AB), 2))) + ',1=0000,2=0000,3=0000" > sudo /sys/fs/resctrl/level-ab-core-' + str(core) + '/schemata')
81 else: 90 else:
82 os.system('echo "L3:0=0000,1=' + ("%0.4x" % (int("1"*way_C + "0"*(16-way_AB), 2))) + ',2=0000,3=0000" > /sys/fs/resctrl/level-ab-core-' + core + '/schemata') 91 run('sudo echo "L3:0=0000,1=' + ("%0.4x" % (int("1"*way_AB + "0"*(16-way_AB), 2))) + ',2=0000,3=0000" > sudo /sys/fs/resctrl/level-ab-core-' + str(core) + '/schemata')
92 line += 1
93 run("sudo rm -rf /dev/shm/*")
83 pairID = 0 94 pairID = 0
84 i = 0 95 i = 0
85 for task in levelAB: 96 for task in levelAB:
@@ -113,13 +124,14 @@ def main():
113 else: 124 else:
114 binary = dis_inputs[name1] + " | ./dis/" + name1 + arg 125 binary = dis_inputs[name1] + " | ./dis/" + name1 + arg
115 proc = subprocess.open([binary + " &"], shell = True) 126 proc = subprocess.open([binary + " &"], shell = True)
127 print(binary + " &" )
116 pid = proc.pid 128 pid = proc.pid
117 os.system("echo " + pid + " > /sys/fs/resctrl/level-ab-core-" + core + "/tasks") 129 run("sudo echo " + pid + " > sudo /sys/fs/resctrl/level-ab-core-" + core + "/tasks")
118 130
119 else: 131 else:
120 pairID += 1 132 pairID += 1
121 arg1 = " NULL -1 " + core + " 0 NULL NULL 0 " + str(pairID) + " " + period1 + " " + criticality 133 arg1 = " NULL -1 " + core + " 0 NULL NULL 0 " + str(pairID) + " " + period1 + " " + criticality
122 arg2 = " NULL -1 " + str(int(core)+16) + " 0 NULL NULL 0 " + str(pairID) + " " + period1 + " " + criticality 134 arg2 = " NULL -1 " + str(int(core)+16) + " 0 NULL NULL 0 " + str(pairID) + " " + period2 + " " + criticality
123 135
124 if(suite1 == "TACLe"): 136 if(suite1 == "TACLe"):
125 binary1 = "./all_pairs/bin/" + name1 + arg1 137 binary1 = "./all_pairs/bin/" + name1 + arg1
@@ -127,18 +139,20 @@ def main():
127 else: 139 else:
128 binary1 = dis_inputs[name1] + " | ./dis/" + name1 + "_all" + arg1 140 binary1 = dis_inputs[name1] + " | ./dis/" + name1 + "_all" + arg1
129 binary2 = dis_inputs[name2] + " | ./dis/" + name2 + "_all" + arg2 141 binary2 = dis_inputs[name2] + " | ./dis/" + name2 + "_all" + arg2
130 proc1 = subprocess.Popen(["numactl --membind=0 " + binary1 + " &"], shell = True) 142 proc1 = subprocess.Popen(["sudo numactl --membind=0 " + binary1 + " &"], shell = True)
131 proc2 = subprocess.Popen(["numactl --membind=1 " + binary2 + " &"], shell = True) 143 proc2 = subprocess.Popen(["sudo numactl --membind=1 " + binary2 + " &"], shell = True)
144 print("sudo numactl --membind=0 " + binary1 + " &")
145 print("sudo numactl --membind=1 " + binary2 + " &")
132 pid1 = proc1.pid 146 pid1 = proc1.pid
133 pid2 = proc2.pid 147 pid2 = proc2.pid
134 148
135 os.system("echo " + str(pid1) + " > /sys/fs/resctrl/level-ab-core-" + core + "/tasks") 149 run("sudo echo " + str(pid1) + " > sudo /sys/fs/resctrl/level-ab-core-" + core + "/tasks")
136 os.system("echo " + str(pid2) + " > /sys/fs/resctrl/level-ab-core-" + core + "/tasks") 150 run("sudo echo " + str(pid2) + " > sudo /sys/fs/resctrl/level-ab-core-" + core + "/tasks")
137 151 #exit(1)
138 152
139 for task in levelC: 153 for task in levelC:
140 i+=1 154 i+=1
141 if(i>6): 155 if(i>8):
142 break 156 break
143 tid = int(task[0]) 157 tid = int(task[0])
144 name = all_tasks[tid][2] 158 name = all_tasks[tid][2]
@@ -159,9 +173,11 @@ def main():
159 binary = "./baseline/bin/" + name1 + arg 173 binary = "./baseline/bin/" + name1 + arg
160 else: 174 else:
161 binary = dis_inputs[name1] + " | ./dis/" + name1 + "_all" + arg 175 binary = dis_inputs[name1] + " | ./dis/" + name1 + "_all" + arg
176
177 print(binary + " &")
162 proc = subprocess.Popen([binary + " &"], shell = True) 178 proc = subprocess.Popen([binary + " &"], shell = True)
163 pid = proc.pid 179 pid = proc.pid
164 os.system("echo " + str(pid) + " > /sys/fs/resctrl/level-ab-ccx-" + ccx + "/tasks") 180 run("sudo echo " + str(pid) + " > sudo /sys/fs/resctrl/level-ab-ccx-" + ccx + "/tasks")
165 #os.system("/playpen/mc2/liblitmus/release_ts") 181 #os.system("/playpen/mc2/liblitmus/release_ts")
166 #os.system("ls") 182 #os.system("ls")
167if __name__ == "__main__": 183if __name__ == "__main__":
diff --git a/sudo b/sudo
new file mode 100644
index 0000000..0713b91
--- /dev/null
+++ b/sudo
@@ -0,0 +1 @@
101404 /sys/fs/resctrl/level-ab-ccx-1/tasks