1
1
openmpi/opal/mca/rcache/rcache.h

107 строки
3.6 KiB
C
Исходник Обычный вид История

/* -*- Mode: C; c-basic-offset:4 ; -*- */
/**
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2007 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2009 IBM Corporation. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
/**
* @file
* Description of the Registration Cache framework
*/
#ifndef MCA_RCACHE_H
#define MCA_RCACHE_H
#include "opal/mca/mca.h"
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-) WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic. This commit was SVN r32317.
2014-07-26 04:47:28 +04:00
#include "opal/mca/mpool/mpool.h"
#include "opal/threads/mutex.h"
/**
* component initialize
*/
typedef struct mca_rcache_base_module_t* (*mca_rcache_base_component_init_fn_t)(void);
typedef int (*mca_rcache_base_module_find_fn_t) (
struct mca_rcache_base_module_t* rcache, void* addr, size_t size,
mca_mpool_base_registration_t **reg);
typedef int (*mca_rcache_base_module_find_all_fn_t)(
struct mca_rcache_base_module_t* rcache, void* addr, size_t size,
mca_mpool_base_registration_t **regs, int reg_cnt);
typedef int (*mca_rcache_base_module_insert_fn_t)(
struct mca_rcache_base_module_t* rcache,
mca_mpool_base_registration_t* registration, size_t limit);
typedef int (*mca_rcache_base_module_delete_fn_t)(
struct mca_rcache_base_module_t* rcache,
mca_mpool_base_registration_t* registration);
/* Do not call the clean function with the rcache lock held */
typedef int (*mca_rcache_base_module_clean_fn_t)(
struct mca_rcache_base_module_t* rcache);
typedef void (*mca_rcache_base_module_dump_range_fn_t)(
struct mca_rcache_base_module_t* rcache, unsigned char* addr, size_t size, char *msg);
/**
* finalize
*/
typedef void (*mca_rcache_base_module_finalize_fn_t)(
struct mca_rcache_base_module_t*);
/**
* rcache component descriptor. Contains component version information and
* open/close/init functions
*/
struct mca_rcache_base_component_2_0_0_t{
mca_base_component_t rcache_version; /**< version */
mca_base_component_data_t rcache_data; /**<metadata */
mca_rcache_base_component_init_fn_t rcache_init; /**<init function */
};
typedef struct mca_rcache_base_component_2_0_0_t mca_rcache_base_component_2_0_0_t;
typedef struct mca_rcache_base_component_2_0_0_t mca_rcache_base_component_t;
/**
* rcache module descriptor
*/
struct mca_rcache_base_module_t {
mca_rcache_base_component_t *rcache_component; /**< component struct */
mca_rcache_base_module_find_fn_t rcache_find;
mca_rcache_base_module_find_all_fn_t rcache_find_all;
mca_rcache_base_module_insert_fn_t rcache_insert;
mca_rcache_base_module_delete_fn_t rcache_delete;
mca_rcache_base_module_clean_fn_t rcache_clean;
mca_rcache_base_module_finalize_fn_t rcache_finalize;
mca_rcache_base_module_dump_range_fn_t rcache_dump_range;
opal_mutex_t lock;
};
typedef struct mca_rcache_base_module_t mca_rcache_base_module_t;
/**
* Macro for use in components that are of type rcache
*/
#define MCA_RCACHE_BASE_VERSION_2_0_0 \
MCA_BASE_VERSION_2_0_0, \
"rcache", 2, 0, 0
#endif /* MCA_RCACHE_H */