瀏覽代碼

Precompute evalplans based on the node's roles

Ian Goldberg 1 年之前
父節點
當前提交
63f3ba7481
共有 1 個文件被更改,包括 9 次插入2 次删除
  1. 9 2
      Enclave/route.cpp

+ 9 - 2
Enclave/route.cpp

@@ -131,8 +131,15 @@ bool route_init()
 #ifdef PROFILE_ROUTING
     unsigned long start = printf_with_rtclock("begin precompute evalplans (%u,%hu) (%u,%hu)\n", tot_msg_per_ing, nthreads, max_round2_msgs, nthreads);
 #endif
-    sort_precompute_evalplan(tot_msg_per_ing, nthreads);
-    sort_precompute_evalplan(max_round2_msgs, nthreads);
+    if (my_roles & ROLE_INGESTION) {
+        sort_precompute_evalplan(tot_msg_per_ing, nthreads);
+    }
+    if (my_roles & ROLE_ROUTING) {
+        sort_precompute_evalplan(max_round2_msgs, nthreads);
+    }
+    if (my_roles & ROLE_STORAGE) {
+        sort_precompute_evalplan(max_stg_msgs, nthreads);
+    }
 #ifdef PROFILE_ROUTING
     printf_with_rtclock_diff(start, "end precompute evalplans\n");
 #endif