root/opal/mca/rcache/grdma/rcache_grdma.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
   2 /*
   3  * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
   4  *                         University Research and Technology
   5  *                         Corporation.  All rights reserved.
   6  * Copyright (c) 2004-2006 The University of Tennessee and The University
   7  *                         of Tennessee Research Foundation.  All rights
   8  *                         reserved.
   9  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
  10  *                         University of Stuttgart.  All rights reserved.
  11  * Copyright (c) 2004-2005 The Regents of the University of California.
  12  *                         All rights reserved.
  13  * Copyright (c) 2006      Voltaire. All rights reserved.
  14  * Copyright (c) 2011-2018 Los Alamos National Security, LLC. All rights
  15  *                         reserved.
  16  *
  17  * $COPYRIGHT$
  18  *
  19  * Additional copyrights may follow
  20  *
  21  * $HEADER$
  22  */
  23 /**
  24  * @file
  25  */
  26 #ifndef MCA_RCACHE_GRDMA_H
  27 #define MCA_RCACHE_GRDMA_H
  28 
  29 #include "opal_config.h"
  30 #include "opal/class/opal_list.h"
  31 #include "opal/mca/event/event.h"
  32 #include "opal/mca/rcache/rcache.h"
  33 #if HAVE_SYS_MMAN_H
  34 #include <sys/mman.h>
  35 #endif
  36 
  37 #define MCA_RCACHE_GRDMA_REG_FLAG_IN_LRU MCA_RCACHE_FLAGS_MOD_RESV0
  38 
  39 BEGIN_C_DECLS
  40 
  41 struct mca_rcache_grdma_cache_t {
  42     opal_list_item_t super;
  43     char *cache_name;
  44     opal_list_t lru_list;
  45     opal_lifo_t gc_lifo;
  46     mca_rcache_base_vma_module_t *vma_module;
  47 };
  48 typedef struct mca_rcache_grdma_cache_t mca_rcache_grdma_cache_t;
  49 
  50 OBJ_CLASS_DECLARATION(mca_rcache_grdma_cache_t);
  51 
  52 struct mca_rcache_grdma_component_t {
  53     mca_rcache_base_component_t super;
  54     opal_list_t caches;
  55     char *rcache_name;
  56     bool print_stats;
  57     int leave_pinned;
  58 };
  59 typedef struct mca_rcache_grdma_component_t mca_rcache_grdma_component_t;
  60 
  61 OPAL_DECLSPEC extern mca_rcache_grdma_component_t mca_rcache_grdma_component;
  62 
  63 struct mca_rcache_grdma_module_t;
  64 
  65 struct mca_rcache_grdma_module_t {
  66     mca_rcache_base_module_t super;
  67     struct mca_rcache_base_resources_t resources;
  68     mca_rcache_grdma_cache_t *cache;
  69     opal_free_list_t reg_list;
  70     uint32_t stat_cache_hit;
  71     uint32_t stat_cache_miss;
  72     uint32_t stat_evicted;
  73     uint32_t stat_cache_found;
  74     uint32_t stat_cache_notfound;
  75 };
  76 typedef struct mca_rcache_grdma_module_t mca_rcache_grdma_module_t;
  77 
  78 /*
  79  *  Initializes the rcache module.
  80  */
  81 void mca_rcache_grdma_module_init(mca_rcache_grdma_module_t *rcache, mca_rcache_grdma_cache_t *cache);
  82 
  83 END_C_DECLS
  84 #endif

/* [<][>][^][v][top][bottom][index][help] */