[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2b3-227-g38903ff

Service Account noreply at mpich.org
Tue Jul 14 09:51:57 CDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".

The branch, master has been updated
       via  38903fffa4c8f8ac9eada9b109aee27d018c78de (commit)
      from  27d5d7bc65b301a5607588726bcaa77e8ab83869 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/38903fffa4c8f8ac9eada9b109aee27d018c78de

commit 38903fffa4c8f8ac9eada9b109aee27d018c78de
Author: Wesley Bland <wesley.bland at intel.com>
Date:   Thu Jun 11 14:32:31 2015 -0500

    CH3: Remove unnecessary message queue searching
    
    If the channel (netmod) is doing its own message queue matching, the
    message queue traversal algorithms in CH3 can inefficiently traverse the
    posted queue multiple times if the channel keeps matching messages out
    from under it.
    
    Instead of going back to the beginning of the list each time, continue
    searching from wherever the unnecessary request was matched.
    
    Change-Id: I8299ab1bb3e26224ff11cd55998c8585fc9fd7d8
    
    Signed-off-by: Charles J Archer <charles.j.archer at intel.com>
    Reviewed-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/mpid/ch3/src/ch3u_recvq.c b/src/mpid/ch3/src/ch3u_recvq.c
index 7ff61d5..fe16e57 100644
--- a/src/mpid/ch3/src/ch3u_recvq.c
+++ b/src/mpid/ch3/src/ch3u_recvq.c
@@ -773,7 +773,6 @@ MPID_Request * MPIDI_CH3U_Recvq_FDP_or_AEU(MPIDI_Message_match * match,
         MPIR_TAG_CLEAR_ERROR_BITS(match->parts.tag);
     }
 
- top_loop:
     prev_rreq = NULL;
 
     rreq = recvq_posted_head;
@@ -793,16 +792,23 @@ MPID_Request * MPIDI_CH3U_Recvq_FDP_or_AEU(MPIDI_Message_match * match,
 	    }
         MPIR_T_PVAR_LEVEL_DEC(RECVQ, posted_recvq_length, 1);
 
-            /* give channel a chance to match the request, try again if so */
-	    channel_matched = MPIDI_POSTED_RECV_DEQUEUE_HOOK(rreq);
-            if (channel_matched)
-                goto top_loop;
-            
-	    found = TRUE;                
-	    goto lock_exit;
-	}
-	prev_rreq = rreq;
-	rreq = rreq->dev.next;
+            /* Give channel a chance to match the request */
+            channel_matched = MPIDI_POSTED_RECV_DEQUEUE_HOOK(rreq);
+            if (!channel_matched) {
+                /* If the channel did not match the request, the match here is
+                 * valid and we can stop searching for the request. */
+                found = TRUE;
+                goto lock_exit;
+            } else {
+                /* If the channel did match the request, then it's already
+                 * matched in the channel and the request here should be
+                 * discarded. Continue searching. */
+                rreq = rreq->dev.next;
+            }
+        } else {
+            prev_rreq = rreq;
+            rreq = rreq->dev.next;
+        }
     }
     MPIR_T_PVAR_TIMER_END(RECVQ, time_failed_matching_postedq);
 

-----------------------------------------------------------------------

Summary of changes:
 src/mpid/ch3/src/ch3u_recvq.c |   28 +++++++++++++++++-----------
 1 files changed, 17 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list