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_UDREG_H
  27 #define MCA_RCACHE_UDREG_H
  28 
  29 #include "opal_config.h"
  30 #include "opal/class/opal_list.h"
  31 #include "opal/class/opal_free_list.h"
  32 #include "opal/mca/event/event.h"
  33 #include "opal/mca/rcache/rcache.h"
  34 #include "opal/util/proc.h"
  35 #if HAVE_SYS_MMAN_H
  36 #include <sys/mman.h>
  37 #endif
  38 
  39 BEGIN_C_DECLS
  40 
  41 struct mca_rcache_udreg_component_t {
  42     mca_rcache_base_component_t super;
  43     bool print_stats;
  44     int leave_pinned;
  45 };
  46 typedef struct mca_rcache_udreg_component_t mca_rcache_udreg_component_t;
  47 
  48 OPAL_DECLSPEC extern mca_rcache_udreg_component_t mca_rcache_udreg_component;
  49 
  50 struct mca_rcache_udreg_resources_t {
  51     mca_rcache_base_resources_t base;
  52 
  53     
  54     bool   use_kernel_cache;
  55     bool   use_evict_w_unreg;
  56     int    max_entries;
  57     size_t page_size;
  58 };
  59 typedef struct mca_rcache_udreg_resources_t mca_rcache_udreg_resources_t;
  60 
  61 struct mca_rcache_udreg_module_t;
  62 
  63 struct mca_rcache_udreg_module_t {
  64     mca_rcache_base_module_t super;
  65     mca_rcache_udreg_resources_t resources;
  66     opal_free_list_t reg_list;
  67     opal_mutex_t lock;
  68     void *udreg_handle;
  69     
  70 
  71     int requested_access_flags;
  72     int requested_flags;
  73 };
  74 typedef struct mca_rcache_udreg_module_t mca_rcache_udreg_module_t;
  75 
  76 
  77 
  78 
  79 
  80 int mca_rcache_udreg_module_init(mca_rcache_udreg_module_t *rcache);
  81 
  82 END_C_DECLS
  83 #endif