btl/openib : correctly handle eager rdma buffers in mca_btl_openib_del_procs
if eager rdma is used, endpoint reference_count is greater than one. this commit is a temporary fix that OBJ_RELEASE the endpoint as much as needed. thought this is likely correct, it can be suboptimal and hence needs to be reviewed cmr=v1.8.2:reviewer=hjelmn This commit was SVN r31922.
Этот коммит содержится в:
родитель
65a35d92ef
Коммит
d1bcd103ac
@ -19,6 +19,8 @@
|
||||
* Copyright (c) 2009 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2013 Intel, Inc. All rights reserved
|
||||
* Copyright (c) 2013 NVIDIA Corporation. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -1128,7 +1130,7 @@ int mca_btl_openib_del_procs(struct mca_btl_base_module_t* btl,
|
||||
struct ompi_proc_t **procs,
|
||||
struct mca_btl_base_endpoint_t ** peers)
|
||||
{
|
||||
int i,ep_index;
|
||||
int i, ep_index;
|
||||
mca_btl_openib_module_t* openib_btl = (mca_btl_openib_module_t*) btl;
|
||||
mca_btl_openib_endpoint_t* endpoint;
|
||||
|
||||
@ -1144,8 +1146,19 @@ int mca_btl_openib_del_procs(struct mca_btl_base_module_t* btl,
|
||||
continue;
|
||||
}
|
||||
if (endpoint == del_endpoint) {
|
||||
int j;
|
||||
BTL_VERBOSE(("in del_procs %d, setting another endpoint to null",
|
||||
ep_index));
|
||||
/* remove the endpoint from eager_rdma_buffers */
|
||||
for (j=0; j<openib_btl->device->eager_rdma_buffers_count; j++) {
|
||||
if (openib_btl->device->eager_rdma_buffers[j] == endpoint) {
|
||||
/* should it be obj_reference_count == 2 ? */
|
||||
assert(((opal_object_t*)endpoint)->obj_reference_count > 1);
|
||||
OBJ_RELEASE(endpoint);
|
||||
openib_btl->device->eager_rdma_buffers[j] = NULL;
|
||||
/* can we simply break and leave the for loop ? */
|
||||
}
|
||||
}
|
||||
opal_pointer_array_set_item(openib_btl->device->endpoints,
|
||||
ep_index, NULL);
|
||||
assert(((opal_object_t*)endpoint)->obj_reference_count == 1);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user