11/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
22/*
3- * Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights
3+ * Copyright (c) 2013-2016 Los Alamos National Security, LLC. All rights
44 * reserved.
55 * Copyright (c) 2014 Research Organization for Information Science
66 * and Technology (RIST). All rights reserved.
1717#include "btl_scif.h"
1818#include "btl_scif_frag.h"
1919
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 );
2221static void * mca_btl_scif_connect_accept (void * arg );
2322
2423int 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,
4847 procs_on_board ++ ;
4948 }
5049
51- /* allocate space for the detected peers and setup the mpool */
50+ /* allocate space for the detected peers and setup the rcache */
5251 if (NULL == scif_module -> endpoints ) {
5352 scif_module -> endpoints = calloc (procs_on_board , sizeof (mca_btl_base_endpoint_t ));
5453 if (OPAL_UNLIKELY (NULL == scif_module -> endpoints )) {
5554 return OPAL_ERR_OUT_OF_RESOURCE ;
5655 }
5756
58- rc = mca_btl_scif_setup_mpools (scif_module );
57+ rc = mca_btl_scif_setup_rcache (scif_module );
5958 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" ));
6160 return rc ;
6261 }
6362 }
@@ -178,15 +177,15 @@ static int scif_dereg_mem (void *reg_data, mca_mpool_base_registration_t *reg)
178177}
179178
180179static 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 )
182181{
183182 mca_btl_scif_reg_t * scif_reg = (mca_btl_scif_reg_t * )reg ;
184183 int rc = OPAL_SUCCESS ;
185184 unsigned int i ;
186185
187186 scif_reg -> handles = calloc (mca_btl_scif_module .endpoint_count , sizeof (scif_reg -> handles [0 ]));
188187
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 */
190189 for (i = 0 ; i < mca_btl_scif_module .endpoint_count ; ++ i ) {
191190 scif_reg -> handles [i ].btl_handle .scif_offset = -1 ;
192191 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,
211210 return rc ;
212211}
213212
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 )
216214{
217- struct mca_mpool_base_resources_t mpool_resources ;
215+ mca_rcache_base_resources_t rcache_resources ;
218216 int rc ;
219217
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" ));
230227 return OPAL_ERROR ;
231228 }
232229
0 commit comments