root/opal/mca/rcache/udreg/rcache_udreg.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-2013 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-2016 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_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     /* udreg specific resources */
  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     /** used to communicate the access flags to the underlying registration
  70      * function */
  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  *  Initializes the rcache module.
  79  */
  80 int mca_rcache_udreg_module_init(mca_rcache_udreg_module_t *rcache);
  81 
  82 END_C_DECLS
  83 #endif

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