Skip to content

Commit 37214ed

Browse files
authored
Merge pull request #3164 from hjelmn/ob1_pinned
pml/ob1: do not cache leave_pinned
2 parents ccac7e5 + 3e7ef48 commit 37214ed

File tree

4 files changed

+9
-15
lines changed

4 files changed

+9
-15
lines changed

ompi/mca/pml/ob1/pml_ob1.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* All rights reserved.
1313
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved
1414
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
15-
* Copyright (c) 2012-2016 Los Alamos National Security, LLC. All rights
15+
* Copyright (c) 2012-2017 Los Alamos National Security, LLC. All rights
1616
* reserved.
1717
* Copyright (c) 2015 Research Organization for Information Science
1818
* and Technology (RIST). All rights reserved.
@@ -60,9 +60,7 @@ struct mca_pml_ob1_t {
6060
size_t rdma_retries_limit;
6161
int max_rdma_per_request;
6262
int max_send_per_range;
63-
bool leave_pinned;
6463
bool use_all_rdma;
65-
int leave_pinned_pipeline;
6664

6765
/* lock queue access */
6866
opal_mutex_t lock;

ompi/mca/pml/ob1/pml_ob1_component.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* All rights reserved.
1313
* Copyright (c) 2007-2010 Cisco Systems, Inc. All rights reserved.
1414
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved
15-
* Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights
15+
* Copyright (c) 2013-2017 Los Alamos National Security, LLC. All rights
1616
* reserved.
1717
* $COPYRIGHT$
1818
*
@@ -295,12 +295,6 @@ mca_pml_ob1_component_init( int* priority,
295295

296296
}
297297

298-
/* Set this here (vs in component_open()) because
299-
opal_leave_pinned* may have been set after MCA params were
300-
read (e.g., by the openib btl) */
301-
mca_pml_ob1.leave_pinned = (1 == opal_leave_pinned);
302-
mca_pml_ob1.leave_pinned_pipeline = (int) opal_leave_pinned_pipeline;
303-
304298
return &mca_pml_ob1.super;
305299
}
306300

ompi/mca/pml/ob1/pml_ob1_cuda.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* Copyright (c) 2008 UT-Battelle, LLC. All rights reserved.
1414
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
1515
* Copyright (c) 2012-2015 NVIDIA Corporation. All rights reserved.
16-
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
16+
* Copyright (c) 2015-2017 Los Alamos National Security, LLC. All rights
1717
* reserved.
1818
* $COPYRIGHT$
1919
*
@@ -25,6 +25,7 @@
2525

2626
#include "ompi_config.h"
2727
#include "opal/prefetch.h"
28+
#include "opal/runtime/opal_params.h"
2829
#include "opal/mca/btl/btl.h"
2930
#include "opal/mca/mpool/mpool.h"
3031
#include "ompi/constants.h"
@@ -143,7 +144,7 @@ size_t mca_pml_ob1_rdma_cuda_btls(
143144
/* if we don't use leave_pinned and all BTLs that already have this memory
144145
* registered amount to less then half of available bandwidth - fall back to
145146
* pipeline protocol */
146-
if(0 == num_btls_used || (!mca_pml_ob1.leave_pinned && weight_total < 0.5))
147+
if(0 == num_btls_used || (!opal_leave_pinned && weight_total < 0.5))
147148
return 0;
148149

149150
mca_pml_ob1_calc_weighted_length(rdma_btls, num_btls_used, size,

ompi/mca/pml/ob1/pml_ob1_rdma.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* University of Stuttgart. All rights reserved.
1111
* Copyright (c) 2004-2005 The Regents of the University of California.
1212
* All rights reserved.
13-
* Copyright (c) 2014-2016 Los Alamos National Security, LLC. All rights
13+
* Copyright (c) 2014-2017 Los Alamos National Security, LLC. All rights
1414
* reserved.
1515
* $COPYRIGHT$
1616
*
@@ -27,6 +27,7 @@
2727
#include "ompi/mca/pml/pml.h"
2828
#include "ompi/mca/bml/bml.h"
2929
#include "opal/mca/mpool/mpool.h"
30+
#include "opal/runtime/opal_params.h"
3031
#include "pml_ob1.h"
3132
#include "pml_ob1_rdma.h"
3233

@@ -79,7 +80,7 @@ size_t mca_pml_ob1_rdma_btls(
7980
/* do not use the RDMA protocol with this btl if 1) leave pinned is disabled,
8081
* 2) the btl supports put, and 3) the fragment is larger than the minimum
8182
* pipeline size specified by the BTL */
82-
if (!mca_pml_ob1.leave_pinned && (btl->btl_flags & MCA_BTL_FLAGS_PUT) &&
83+
if (!opal_leave_pinned && (btl->btl_flags & MCA_BTL_FLAGS_PUT) &&
8384
size > btl->btl_min_rdma_pipeline_size) {
8485
continue;
8586
}
@@ -102,7 +103,7 @@ size_t mca_pml_ob1_rdma_btls(
102103
/* if we don't use leave_pinned and all BTLs that already have this memory
103104
* registered amount to less then half of available bandwidth - fall back to
104105
* pipeline protocol */
105-
if (0 == num_btls_used || (!mca_pml_ob1.leave_pinned && weight_total < 0.5))
106+
if (0 == num_btls_used || (!opal_leave_pinned && weight_total < 0.5))
106107
return 0;
107108

108109
mca_pml_ob1_calc_weighted_length(rdma_btls, num_btls_used, size,

0 commit comments

Comments
 (0)