1
1
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
2
2
/*
3
- * Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights
3
+ * Copyright (c) 2013-2016 Los Alamos National Security, LLC. All rights
4
4
* reserved.
5
5
* Copyright (c) 2014 Research Organization for Information Science
6
6
* and Technology (RIST). All rights reserved.
17
17
#include "btl_scif.h"
18
18
#include "btl_scif_frag.h"
19
19
20
- static int
21
- mca_btl_scif_setup_mpools (mca_btl_scif_module_t * scif_module );
20
+ static int mca_btl_scif_setup_rcache (mca_btl_scif_module_t * scif_module );
22
21
static void * mca_btl_scif_connect_accept (void * arg );
23
22
24
23
int mca_btl_scif_add_procs (struct mca_btl_base_module_t * btl ,
@@ -48,16 +47,16 @@ int mca_btl_scif_add_procs(struct mca_btl_base_module_t* btl,
48
47
procs_on_board ++ ;
49
48
}
50
49
51
- /* allocate space for the detected peers and setup the mpool */
50
+ /* allocate space for the detected peers and setup the rcache */
52
51
if (NULL == scif_module -> endpoints ) {
53
52
scif_module -> endpoints = calloc (procs_on_board , sizeof (mca_btl_base_endpoint_t ));
54
53
if (OPAL_UNLIKELY (NULL == scif_module -> endpoints )) {
55
54
return OPAL_ERR_OUT_OF_RESOURCE ;
56
55
}
57
56
58
- rc = mca_btl_scif_setup_mpools (scif_module );
57
+ rc = mca_btl_scif_setup_rcache (scif_module );
59
58
if (OPAL_UNLIKELY (OPAL_SUCCESS != rc )) {
60
- BTL_ERROR (("btl/scif error setting up mpools/ free lists" ));
59
+ BTL_ERROR (("btl/scif error setting up rcache or free lists" ));
61
60
return rc ;
62
61
}
63
62
}
@@ -178,15 +177,15 @@ static int scif_dereg_mem (void *reg_data, mca_mpool_base_registration_t *reg)
178
177
}
179
178
180
179
static int scif_reg_mem (void * reg_data , void * base , size_t size ,
181
- mca_mpool_base_registration_t * reg )
180
+ mca_rcache_base_registration_t * reg )
182
181
{
183
182
mca_btl_scif_reg_t * scif_reg = (mca_btl_scif_reg_t * )reg ;
184
183
int rc = OPAL_SUCCESS ;
185
184
unsigned int i ;
186
185
187
186
scif_reg -> handles = calloc (mca_btl_scif_module .endpoint_count , sizeof (scif_reg -> handles [0 ]));
188
187
189
- /* intialize all scif offsets to -1 and initialize the pointer back to the mpool registration */
188
+ /* intialize all scif offsets to -1 and initialize the pointer back to the rcache registration */
190
189
for (i = 0 ; i < mca_btl_scif_module .endpoint_count ; ++ i ) {
191
190
scif_reg -> handles [i ].btl_handle .scif_offset = -1 ;
192
191
scif_reg -> handles [i ].btl_handle .scif_base = (intptr_t ) base ;
@@ -211,22 +210,20 @@ static int scif_reg_mem (void *reg_data, void *base, size_t size,
211
210
return rc ;
212
211
}
213
212
214
- static int
215
- mca_btl_scif_setup_mpools (mca_btl_scif_module_t * scif_module )
213
+ static int mca_btl_scif_setup_rcache (mca_btl_scif_module_t * scif_module )
216
214
{
217
- struct mca_mpool_base_resources_t mpool_resources ;
215
+ mca_rcache_base_resources_t rcache_resources ;
218
216
int rc ;
219
217
220
- /* initialize the grdma mpool */
221
- mpool_resources .pool_name = "scif" ;
222
- mpool_resources .reg_data = (void * ) scif_module ;
223
- mpool_resources .sizeof_reg = sizeof (mca_btl_scif_reg_t );
224
- mpool_resources .register_mem = scif_reg_mem ;
225
- mpool_resources .deregister_mem = scif_dereg_mem ;
226
- scif_module -> super .btl_mpool =
227
- mca_mpool_base_module_create ("grdma" , scif_module , & mpool_resources );
228
- if (NULL == scif_module -> super .btl_mpool ) {
229
- BTL_ERROR (("error creating grdma mpool" ));
218
+ /* initialize the grdma rcache */
219
+ rcache_resources .cache_name = "scif" ;
220
+ rcache_resources .reg_data = (void * ) scif_module ;
221
+ rcache_resources .sizeof_reg = sizeof (mca_btl_scif_reg_t );
222
+ rcache_resources .register_mem = scif_reg_mem ;
223
+ rcache_resources .deregister_mem = scif_dereg_mem ;
224
+ scif_module -> rcache = mca_rcache_base_module_create ("grdma" , scif_module , & rcache_resources );
225
+ if (NULL == scif_module -> rcache ) {
226
+ BTL_ERROR (("error creating grdma rcache" ));
230
227
return OPAL_ERROR ;
231
228
}
232
229
0 commit comments