1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 
  13 
  14 
  15 
  16 
  17 
  18 
  19 
  20 
  21 
  22 
  23 
  24 
  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 
  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