implementated progress engine
authorGengbin Zheng <gzheng@illinois.edu>
Sun, 8 Apr 2012 21:18:02 +0000 (16:18 -0500)
committerGengbin Zheng <gzheng@illinois.edu>
Sun, 8 Apr 2012 21:18:02 +0000 (16:18 -0500)
src/arch/gemini_gni/machine.c

index d44fd9c00ec4f473ee9ebf6fb9368a668710c907..5f12ecedd521e7f308f4bbb0ba6afe8f243d7021 100644 (file)
@@ -1104,12 +1104,6 @@ void my_free_huge_pages(void *ptr, int size)
 #include "machine-lrts.h"
 #include "machine-common-core.c"
 
 #include "machine-lrts.h"
 #include "machine-common-core.c"
 
-/* Network progress function is used to poll the network when for
-   messages. This flushes receive buffers on some  implementations*/
-#if CMK_MACHINE_PROGRESS_DEFINED
-void CmiMachineProgressImpl() {
-}
-#endif
 
 static int SendBufferMsg(SMSG_QUEUE *queue, SMSG_QUEUE *urgent_queue);
 static void SendRdmaMsg(PCQueue );
 
 static int SendBufferMsg(SMSG_QUEUE *queue, SMSG_QUEUE *urgent_queue);
 static void SendRdmaMsg(PCQueue );
@@ -1898,20 +1892,10 @@ void LrtsPostCommonInit(int everReturn)
 }
 
 /* this is called by worker thread */
 }
 
 /* this is called by worker thread */
-void LrtsPostNonLocal(){
-
-#if MULTI_THREAD_SEND
-#if CMK_WORKER_SINGLE_TASK
-    if (CmiMyRank() % 5 == 1)
-#endif
-    {
-        traceEndIdle();
-        PUMP_REMOTE_HIGHPRIORITY
-        POST_HIGHPRIORITY_RDMA
-        traceBeginIdle();
-    }
-#endif
+void LrtsPostNonLocal()
+{
 #if 0
 #if 0
+
 #if CMK_SMP_TRACE_COMMTHREAD
     double startT, endT;
 #endif
 #if CMK_SMP_TRACE_COMMTHREAD
     double startT, endT;
 #endif
@@ -1924,6 +1908,30 @@ void LrtsPostNonLocal(){
     startT = CmiWallTimer();
 #endif
 
     startT = CmiWallTimer();
 #endif
 
+    CmiMachineProgressImpl();
+
+#if CMK_SMP_TRACE_COMMTHREAD
+    endT = CmiWallTimer();
+    traceUserBracketEvent(event_AdvanceCommunication, startT, endT);
+    traceBeginIdle();
+#endif
+
+#endif
+#endif
+}
+
+/* Network progress function is used to poll the network when for
+   messages. This flushes receive buffers on some  implementations*/
+#if CMK_MACHINE_PROGRESS_DEFINED
+void CmiMachineProgressImpl() {
+#if ! CMK_SMP || MULTI_THREAD_SEND
+
+    SEND_OOB_SMSG(smsg_oob_queue)
+    PUMP_REMOTE_HIGHPRIORITY
+    PUMP_LOCAL_HIGHPRIORITY
+    POST_HIGHPRIORITY_RDMA
+
+#if 0
 #if CMK_WORKER_SINGLE_TASK
     if (CmiMyRank() % 6 == 0)
 #endif
 #if CMK_WORKER_SINGLE_TASK
     if (CmiMyRank() % 6 == 0)
 #endif
@@ -1967,15 +1975,11 @@ void LrtsPostNonLocal(){
     STATS_SENDRDMAMSG_TIME(SendRdmaMsg());
 #endif
 
     STATS_SENDRDMAMSG_TIME(SendRdmaMsg());
 #endif
 
-#if CMK_SMP_TRACE_COMMTHREAD
-    endT = CmiWallTimer();
-    traceUserBracketEvent(event_AdvanceCommunication, startT, endT);
-    traceBeginIdle();
-#endif
-
 #endif
 #endif
 }
 #endif
 #endif
 }
+#endif
+
 
 /* useDynamicSMSG */
 static void    PumpDatagramConnection()
 
 /* useDynamicSMSG */
 static void    PumpDatagramConnection()