|
3 | 3 | * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana |
4 | 4 | * University Research and Technology |
5 | 5 | * Corporation. All rights reserved. |
6 | | - * Copyright (c) 2004-2018 The University of Tennessee and The University |
| 6 | + * Copyright (c) 2004-2019 The University of Tennessee and The University |
7 | 7 | * of Tennessee Research Foundation. All rights |
8 | 8 | * reserved. |
9 | 9 | * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, |
@@ -929,19 +929,21 @@ static int mca_pml_ob1_recv_frag_match( mca_btl_base_module_t *btl, |
929 | 929 | frag_msg_seq = hdr->hdr_seq; |
930 | 930 | next_msg_seq_expected = (uint16_t)proc->expected_sequence; |
931 | 931 |
|
932 | | - /* If the sequence number is wrong, queue it up for later. */ |
933 | | - if(OPAL_UNLIKELY(frag_msg_seq != next_msg_seq_expected)) { |
934 | | - mca_pml_ob1_recv_frag_t* frag; |
935 | | - MCA_PML_OB1_RECV_FRAG_ALLOC(frag); |
936 | | - MCA_PML_OB1_RECV_FRAG_INIT(frag, hdr, segments, num_segments, btl); |
937 | | - append_frag_to_ordered_list(&proc->frags_cant_match, frag, next_msg_seq_expected); |
| 932 | + if (!OMPI_COMM_CHECK_ASSERT_ALLOW_OVERTAKE(comm_ptr)) { |
| 933 | + /* If the sequence number is wrong, queue it up for later. */ |
| 934 | + if(OPAL_UNLIKELY(frag_msg_seq != next_msg_seq_expected)) { |
| 935 | + mca_pml_ob1_recv_frag_t* frag; |
| 936 | + MCA_PML_OB1_RECV_FRAG_ALLOC(frag); |
| 937 | + MCA_PML_OB1_RECV_FRAG_INIT(frag, hdr, segments, num_segments, btl); |
| 938 | + append_frag_to_ordered_list(&proc->frags_cant_match, frag, next_msg_seq_expected); |
938 | 939 |
|
939 | | - SPC_RECORD(OMPI_SPC_OUT_OF_SEQUENCE, 1); |
940 | | - SPC_RECORD(OMPI_SPC_OOS_IN_QUEUE, 1); |
941 | | - SPC_UPDATE_WATERMARK(OMPI_SPC_MAX_OOS_IN_QUEUE, OMPI_SPC_OOS_IN_QUEUE); |
| 940 | + SPC_RECORD(OMPI_SPC_OUT_OF_SEQUENCE, 1); |
| 941 | + SPC_RECORD(OMPI_SPC_OOS_IN_QUEUE, 1); |
| 942 | + SPC_UPDATE_WATERMARK(OMPI_SPC_MAX_OOS_IN_QUEUE, OMPI_SPC_OOS_IN_QUEUE); |
942 | 943 |
|
943 | | - OB1_MATCHING_UNLOCK(&comm->matching_lock); |
944 | | - return OMPI_SUCCESS; |
| 944 | + OB1_MATCHING_UNLOCK(&comm->matching_lock); |
| 945 | + return OMPI_SUCCESS; |
| 946 | + } |
945 | 947 | } |
946 | 948 |
|
947 | 949 | /* mca_pml_ob1_recv_frag_match_proc() will release the lock. */ |
@@ -977,6 +979,10 @@ mca_pml_ob1_recv_frag_match_proc( mca_btl_base_module_t *btl, |
977 | 979 |
|
978 | 980 | match_this_frag: |
979 | 981 | /* We're now expecting the next sequence number. */ |
| 982 | + /* NOTE: We should have checked for ALLOW_OVERTAKE comm flag here |
| 983 | + * but adding a branch in this critical path is not ideal for performance. |
| 984 | + * We decided to let it run the sequence number even we are not doing |
| 985 | + * anything with it. */ |
980 | 986 | proc->expected_sequence++; |
981 | 987 |
|
982 | 988 | /* We generate the SEARCH_POSTED_QUEUE only when the message is |
|
0 commit comments