Hermes
0.9.5-beta
Hierarchical Distributed I/O Buffering System
|
Namespaces | |
pubsub | |
Typedefs | |
using | BoMoveList = std::vector< std::pair< BufferID, std::vector< BufferID > >> |
typedef void(* | BarrierFunc) (void *) |
typedef void(* | FinalizeFunc) (void *) |
typedef uint8_t | u8 |
typedef uint16_t | u16 |
typedef uint32_t | u32 |
typedef uint64_t | u64 |
typedef int8_t | i8 |
typedef int16_t | i16 |
typedef int32_t | i32 |
typedef int64_t | i64 |
typedef float | f32 |
typedef double | f64 |
typedef u16 | DeviceID |
using | PlacementSchema = std::vector< std::pair< size_t, TargetID > > |
typedef u64 | TraitID |
typedef void() | ArenaErrorFunc() |
typedef void(* | StartFunc) (SharedMemoryContext *, RpcContext *, Arena *, const char *, int) |
Enumerations | |
enum class | BoOperation { kMove , kCopy , kDelete , kCount } |
enum class | BoPriority { kLow , kHigh , kCount } |
enum | SwapBlobMembers { SwapBlobMembers_NodeId , SwapBlobMembers_Offset , SwapBlobMembers_Size , SwapBlobMembers_BucketId , SwapBlobMembers_Count } |
enum | Topology { Topology_Local , Topology_Neighborhood , Topology_Global , Topology_Count } |
enum | StatusCode { HERMES_OK_MAX = 2 , BLOB_IN_SWAP_PLACE = 1 , HERMES_SUCCESS = 0 , INVALID_BUCKET = -1 , BUCKET_NAME_TOO_LONG = -2 , VBUCKET_NAME_TOO_LONG = -3 , BLOB_NAME_TOO_LONG = -4 , INVALID_BLOB = -5 , BLOB_NOT_IN_BUCKET = -6 , BLOB_NOT_LINKED_TO_VBUCKET = -7 , TRAIT_NOT_VALID = -8 , TRAIT_EXISTS_ALREADY = -9 , OFFSET_MAP_EMPTY = -10 , BLOB_NOT_LINKED_IN_MAP = -11 , BUCKET_IN_USE = -12 , DPE_RANDOM_FOUND_NO_TGT = -13 , DPE_GET_INVALID_TGT = -14 , DPE_ORTOOLS_NO_SOLUTION = -15 , DPE_PLACEMENTSCHEMA_EMPTY = -16 , READ_BLOB_FAILED = -17 , STDIO_OFFSET_ERROR = -18 , STDIO_FWRITE_FAILED = -19 , STDIO_FOPEN_FAILED = -20 , STDIO_FCLOSE_FAILED = -21 , INVALID_FILE = -23 , PLACE_SWAP_BLOB_TO_BUF_FAILED = -24 , DPE_RR_FIND_TGT_FAILED = -25 , HERMES_ERROR_MAX = -26 } |
enum class | ProcessKind { kApp , kHermes , kCount } |
enum | ArenaType { kArenaType_BufferPool , kArenaType_MetaData , kArenaType_Transient , kArenaType_Count } |
enum | MapType { kMapType_Bucket , kMapType_VBucket , kMapType_BlobId , kMapType_BlobInfo , kMapType_Count } |
enum class | ThresholdViolation { kMin , kMax } |
Functions | |
ArenaInfo | GetArenaInfo (Config *config) |
std::vector< std::string > | GetHostsFromFile (const std::string &host_file) |
void | PushHostNames (Arena *arenas, RpcContext *rpc, const std::vector< std::string > &host_names, MetadataManager *mdm, u8 *shmem_base) |
SharedMemoryContext | InitHermesCore (Config *config, CommunicationContext *comm, ArenaInfo *arena_info, Arena *arenas, RpcContext *rpc) |
SharedMemoryContext | BootstrapSharedMemory (Arena *arenas, Config *config, CommunicationContext *comm, RpcContext *rpc, bool is_daemon, bool is_adapter) |
std::shared_ptr< api::Hermes > | InitHermes (Config *config, bool is_daemon, bool is_adapter) |
std::shared_ptr< api::Hermes > | InitHermesClient (const char *config_file=NULL) |
Initialize a Hermes instance as a client or adapter. More... | |
std::shared_ptr< api::Hermes > | InitHermesDaemon (char *config_file=NULL) |
Initialize a Hermes instance as a daemon. More... | |
std::shared_ptr< api::Hermes > | InitHermesDaemon (Config *config) |
bool | operator== (const BufferInfo &lhs, const BufferInfo &rhs) |
BufferInfo | LocalGetBufferInfo (SharedMemoryContext *context, BufferID buffer_id) |
BufferInfo | GetBufferInfo (SharedMemoryContext *context, RpcContext *rpc, BufferID buffer_id) |
f32 | NormalizeAccessScore (SharedMemoryContext *context, f32 raw_score, f32 size_mb) |
static f32 | BytesToMegabytes (size_t bytes) |
std::vector< BufferInfo > | GetBufferInfo (SharedMemoryContext *context, RpcContext *rpc, const std::vector< BufferID > &buffer_ids) |
f32 | ComputeBlobAccessScore (SharedMemoryContext *context, const std::vector< BufferInfo > &buffer_info) |
void | SortBufferInfo (std::vector< BufferInfo > &buffer_info, bool increasing) |
void | SortTargetInfo (std::vector< TargetInfo > &target_info, bool increasing) |
void | EnqueueBoMove (RpcContext *rpc, const BoMoveList &moves, BlobID blob_id, BucketID bucket_id, const std::string &internal_name, BoPriority priority) |
void | LocalEnqueueBoMove (SharedMemoryContext *context, RpcContext *rpc, const BoMoveList &moves, BlobID blob_id, BucketID bucket_id, const std::string &internal_blob_name, BoPriority priority) |
void | BoMove (SharedMemoryContext *context, RpcContext *rpc, const BoMoveList &moves, BlobID blob_id, BucketID bucket_id, const std::string &internal_blob_name) |
void | LocalOrganizeBlob (SharedMemoryContext *context, RpcContext *rpc, const std::string &internal_blob_name, BucketID bucket_id, f32 epsilon, f32 explicit_importance_score) |
void | OrganizeBlob (SharedMemoryContext *context, RpcContext *rpc, BucketID bucket_id, const std::string &blob_name, f32 epsilon, f32 importance_score) |
void | EnforceCapacityThresholds (SharedMemoryContext *context, RpcContext *rpc, ViolationInfo info) |
void | LocalEnforceCapacityThresholds (SharedMemoryContext *context, RpcContext *rpc, ViolationInfo info) |
void | LocalShutdownBufferOrganizer (SharedMemoryContext *context) |
void | FlushBlob (SharedMemoryContext *context, RpcContext *rpc, BlobID blob_id, const std::string &filename, u64 offset, bool async) |
bool | EnqueueFlushingTask (RpcContext *rpc, BlobID blob_id, const std::string &filename, u64 offset) |
bool | LocalEnqueueFlushingTask (SharedMemoryContext *context, RpcContext *rpc, BlobID blob_id, const std::string &filename, u64 offset) |
Status | PlaceInHierarchy (SharedMemoryContext *context, RpcContext *rpc, SwapBlob swap_blob, const std::string &name, const api::Context &ctx) |
void | LocalAdjustFlushCount (SharedMemoryContext *context, const std::string &vbkt_name, int adjustment) |
void | LocalIncrementFlushCount (SharedMemoryContext *context, const std::string &vbkt_name) |
void | LocalDecrementFlushCount (SharedMemoryContext *context, const std::string &vbkt_name) |
void | IncrementFlushCount (SharedMemoryContext *context, RpcContext *rpc, const std::string &vbkt_name) |
void | DecrementFlushCount (SharedMemoryContext *context, RpcContext *rpc, const std::string &vbkt_name) |
void | AwaitAsyncFlushingTasks (SharedMemoryContext *context, RpcContext *rpc, VBucketID id) |
void | OrganizeDevice (SharedMemoryContext *context, RpcContext *rpc, DeviceID devices_id) |
bool | operator== (const BufferID &lhs, const BufferID &rhs) |
void | Finalize (SharedMemoryContext *context, CommunicationContext *comm, RpcContext *rpc, const char *shmem_name, Arena *trans_arena, bool is_application_core, bool force_rpc_shutdown) |
void | LockBuffer (BufferHeader *header) |
void | UnlockBuffer (BufferHeader *header) |
BufferPool * | GetBufferPoolFromContext (SharedMemoryContext *context) |
Device * | GetDeviceFromHeader (SharedMemoryContext *context, BufferHeader *header) |
Target * | GetTarget (SharedMemoryContext *context, int index) |
Target * | GetTargetFromId (SharedMemoryContext *context, TargetID id) |
std::vector< f32 > | GetBandwidths (SharedMemoryContext *context, const std::vector< TargetID > &targets) |
Device * | GetDeviceById (SharedMemoryContext *context, DeviceID device_id) |
DeviceID | GetDeviceIdFromTargetId (TargetID target_id) |
BufferHeader * | GetHeadersBase (SharedMemoryContext *context) |
BufferHeader * | GetHeaderByIndex (SharedMemoryContext *context, u32 index) |
BufferHeader * | GetHeaderByBufferId (SharedMemoryContext *context, BufferID id) |
void | ResetHeader (BufferHeader *header) |
static void | MakeHeaderDormant (BufferHeader *header) |
bool | HeaderIsDormant (BufferHeader *header) |
i32 | GetSlabUnitSize (SharedMemoryContext *context, DeviceID device_id, int slab_index) |
i32 | GetSlabBufferSize (SharedMemoryContext *context, DeviceID device_id, int slab_index) |
BufferID * | GetFreeListPtr (SharedMemoryContext *context, DeviceID device_id) |
int | GetSlabIndexFromHeader (SharedMemoryContext *context, BufferHeader *header) |
bool | BufferIsRemote (CommunicationContext *comm, BufferID buffer_id) |
bool | BufferIsRemote (RpcContext *rpc, BufferID buffer_id) |
bool | IsNullBufferId (BufferID id) |
bool | BufferIsByteAddressable (SharedMemoryContext *context, BufferID id) |
BufferID | PeekFirstFreeBufferId (SharedMemoryContext *context, DeviceID device_id, int slab_index) |
void | SetFirstFreeBufferId (SharedMemoryContext *context, DeviceID device_id, int slab_index, BufferID new_id) |
std::atomic< u32 > * | GetAvailableBuffersArray (SharedMemoryContext *context, DeviceID device_id) |
static u32 | GetNumBuffersAvailable (SharedMemoryContext *context, DeviceID device_id, int slab_index) |
u32 | GetNumBuffersAvailable (SharedMemoryContext *context, DeviceID device_id) |
static void | DecrementAvailableBuffers (SharedMemoryContext *context, DeviceID device_id, int slab_index) |
static void | IncrementAvailableBuffers (SharedMemoryContext *context, DeviceID device_id, int slab_index) |
void | UpdateBufferingCapacities (SharedMemoryContext *context, i64 adjustment, DeviceID device_id) |
void | LocalReleaseBuffer (SharedMemoryContext *context, BufferID buffer_id) |
void | ReleaseBuffer (SharedMemoryContext *context, RpcContext *rpc, BufferID buffer_id) |
void | ReleaseBuffers (SharedMemoryContext *context, RpcContext *rpc, const std::vector< BufferID > &buffer_ids) |
void | LocalReleaseBuffers (SharedMemoryContext *context, const std::vector< BufferID > &buffer_ids) |
BufferID | GetFreeBuffer (SharedMemoryContext *context, DeviceID device_id, int slab_index) |
std::vector< BufferID > | GetBuffers (SharedMemoryContext *context, const PlacementSchema &schema) |
u32 | LocalGetBufferSize (SharedMemoryContext *context, BufferID id) |
u32 | GetBufferSize (SharedMemoryContext *context, RpcContext *rpc, BufferID id) |
size_t | GetBlobSize (SharedMemoryContext *context, RpcContext *rpc, BufferIdArray *buffer_ids) |
size_t | GetBlobSizeById (SharedMemoryContext *context, RpcContext *rpc, Arena *arena, BlobID blob_id) |
ptrdiff_t | GetBufferOffset (SharedMemoryContext *context, BufferID id) |
u8 * | GetRamBufferPtr (SharedMemoryContext *context, BufferID buffer_id) |
BufferID | MakeBufferId (u32 node_id, u32 header_index) |
void | PartitionRamBuffers (Arena *arena, i32 buffer_size, i32 buffer_count, int block_size) |
BufferID | MakeBufferHeaders (Arena *arena, int buffer_size, u32 start_index, u32 end_index, int node_id, DeviceID device_id, ptrdiff_t initial_offset, u8 **header_begin) |
Device * | InitDevices (Arena *arena, Config *config, f32 &min_bw, f32 &max_bw) |
Target * | InitTargets (Arena *arena, Config *config, Device *devices, int node_id) |
void | MergeRamBufferFreeList (SharedMemoryContext *context, int slab_index) |
void | SplitRamBufferFreeList (SharedMemoryContext *context, int slab_index) |
ptrdiff_t | InitBufferPool (u8 *shmem_base, Arena *buffer_pool_arena, Arena *scratch_arena, i32 node_id, Config *config) |
void | SerializeBufferPoolToFile (SharedMemoryContext *context, FILE *file) |
void | MakeFullShmemName (char *dest, const char *base) |
FILE * | FopenOrTerminate (const char *fname, const char *mode) |
int | OpenOrTerminate (const std::string &fname, int flags, mode_t mode=0) |
void | InitFilesForBuffering (SharedMemoryContext *context, CommunicationContext &comm) |
u8 * | InitSharedMemory (const char *shmem_name, size_t total_size) |
SharedMemoryContext | GetSharedMemoryContext (char *shmem_name) |
void | UnmapSharedMemory (SharedMemoryContext *context) |
void | CloseBufferingFiles (SharedMemoryContext *context) |
void | ReleaseSharedMemoryContext (SharedMemoryContext *context) |
size_t | LocalWriteBufferById (SharedMemoryContext *context, BufferID id, const Blob &blob, size_t offset) |
void | WriteBlobToBuffers (SharedMemoryContext *context, RpcContext *rpc, const Blob &blob, const std::vector< BufferID > &buffer_ids) |
size_t | LocalReadBufferById (SharedMemoryContext *context, BufferID id, Blob *blob, size_t read_offset) |
size_t | ReadBlobFromBuffers (SharedMemoryContext *context, RpcContext *rpc, Blob *blob, BufferIdArray *buffer_ids, u32 *buffer_sizes) |
size_t | ReadBlobById (SharedMemoryContext *context, RpcContext *rpc, Arena *arena, Blob blob, BlobID blob_id) |
size_t | ReadBlobById (SharedMemoryContext *context, RpcContext *rpc, Arena *arena, api::Blob &dest, BlobID blob_id) |
void | OpenSwapFile (SharedMemoryContext *context, u32 node_id) |
SwapBlob | WriteToSwap (SharedMemoryContext *context, Blob blob, u32 node_id, BucketID bucket_id) |
SwapBlob | PutToSwap (SharedMemoryContext *context, RpcContext *rpc, const std::string &name, BucketID bucket_id, const u8 *data, size_t size) |
size_t | ReadFromSwap (SharedMemoryContext *context, Blob blob, SwapBlob swap_blob) |
api::Status | PlaceBlob (SharedMemoryContext *context, RpcContext *rpc, PlacementSchema &schema, Blob blob, const std::string &name, BucketID bucket_id, const api::Context &ctx, bool called_from_buffer_organizer) |
api::Status | StdIoPersistBucket (SharedMemoryContext *context, RpcContext *rpc, Arena *arena, BucketID bucket_id, const std::string &file_name, const std::string &open_mode) |
api::Status | StdIoPersistBlob (SharedMemoryContext *context, RpcContext *rpc, Arena *arena, BlobID blob_id, int fd, const i32 &offset) |
f32 | GetBlobImportanceScore (SharedMemoryContext *context, RpcContext *rpc, BlobID blob_id) |
void | StartBufferPoolRpcServer (SharedMemoryContext *context, const char *addr, i32 num_rpc_threads) |
template<typename T > | |
std::vector< SwapBlob > | PutToSwap (SharedMemoryContext *context, RpcContext *rpc, BucketID id, std::vector< std::vector< T >> &blobs, std::vector< std::string > &names) |
SwapBlob | WriteToSwap (SharedMemoryContext *context, Blob blob, BlobID blob_id, BucketID bucket_id) |
void | ParseConfig (Arena *arena, const char *path, Config *config) |
size_t | InitCommunication (CommunicationContext *comm, Arena *arena, size_t trans_arena_size_per_node, bool is_daemon=false, bool is_adapter=false) |
void | WorldBarrier (CommunicationContext *comm) |
void | SubBarrier (CommunicationContext *comm) |
void * | GetAppCommunicator (CommunicationContext *comm) |
int | MpiGetProcId (MPI_Comm comm) |
int | MpiGetWorldProcId (void *state) |
int | MpiGetSubProcId (void *state) |
int | MpiGetNumProcs (MPI_Comm comm) |
int | MpiGetNumWorldProcs (void *state) |
void | MpiBarrier (MPI_Comm comm) |
void | MpiWorldBarrier (void *state) |
void | MpiSubBarrier (void *state) |
bool | MpiFirstOnNode (MPI_Comm comm) |
size_t | MpiAssignIDsToNodes (CommunicationContext *comm, size_t trans_arena_size_per_node) |
void | MpiFinalize (void *state) |
void | PrintExpectedAndFail (const std::string &expected, u32 line_number=0) |
void | RequireNumDevices (Config *config) |
void | RequireNumSlabs (Config *config) |
void | RequireCapacitiesUnset (bool &already_specified) |
void | RequireBlockSizesUnset (bool &already_specified) |
void | ParseCapacities (Config *config, YAML::Node capacities, int unit_conversion, bool &already_specified) |
void | ParseBlockSizes (Config *config, YAML::Node block_sizes, int unit_conversion, bool &already_specified) |
template<typename T > | |
void | ParseArray (YAML::Node list_node, const std::string var, T *list, int max_list_len) |
template<typename T > | |
void | ParseVector (YAML::Node list_node, std::vector< T > &list) |
template<typename T > | |
void | ParseMatrix (YAML::Node matrix_node, const std::string var, T *matrix, int max_row_len, int max_col_len, int *col_len) |
template<typename T > | |
void | ParseMatrix (YAML::Node matrix_node, std::string var, T *matrix, int max_row_len, int max_col_len) |
void | ParseRangeList (YAML::Node list_node, std::string var, std::vector< std::string > &list) |
void | ParseHostNames (YAML::Node yaml_conf, hermes::Config *config) |
void | CheckConstraints (Config *config) |
void | ParseConfigYAML (YAML::Node &yaml_conf, Config *config) |
void | ParseConfigString (Arena *arena, const std::string &config_string, Config *config) |
void | InitConfig (hermes::Config *config, const char *config_file) |
hermes::Config * | CreateConfig (const char *config_file) |
PlacementSchema | AggregateBlobSchema (PlacementSchema &schema) |
Status | CalculatePlacement (SharedMemoryContext *context, RpcContext *rpc, const std::vector< size_t > &blob_sizes, std::vector< PlacementSchema > &output, const api::Context &api_context) |
bool | IsPowerOfTwo (size_t val) |
uintptr_t | AlignForward (uintptr_t addr, size_t alignment) |
uintptr_t | AlignBackward (uintptr_t addr, size_t alignment) |
void | InitArena (Arena *arena, size_t bytes, u8 *base) |
Arena | InitArenaAndAllocate (size_t bytes) |
void | DestroyArena (Arena *arena) |
size_t | GetRemainingCapacity (Arena *arena) |
void | GrowArena (Arena *arena, size_t new_size) |
The maximum capacity of arena becomes new_size . More... | |
TemporaryMemory | BeginTemporaryMemory (Arena *arena) |
void | EndTemporaryMemory (TemporaryMemory *temp_memory) |
u8 * | PushSize (Arena *arena, size_t size, size_t alignment) |
u8 * | PushSizeAndClear (Arena *arena, size_t size, size_t alignment) |
u8 * | GetHeapMemory (Heap *heap) |
FreeBlock * | GetHeapFreeList (Heap *heap) |
FreeBlock * | NextFreeBlock (Heap *heap, FreeBlock *block) |
u8 * | HeapOffsetToPtr (Heap *heap, u32 offset) |
u32 | GetHeapOffset (Heap *heap, u8 *ptr) |
void | HeapErrorHandler () |
u32 | ComputeHeapExtent (Heap *heap, void *item, u32 size) |
u8 * | HeapExtentToPtr (Heap *heap) |
Heap * | InitHeapInArena (Arena *arena, bool grows_up, u16 alignment) |
FreeBlock * | FindFirstFit (Heap *heap, u32 desired_size) |
u8 * | HeapPushSize (Heap *heap, u32 size) |
void | HeapFree (Heap *heap, void *ptr) |
void * | HeapRealloc (Heap *heap, void *ptr, size_t size) |
void | CoalesceFreeBlocks (Heap *heap) |
Ticket | TryBeginTicketMutex (TicketMutex *mutex, Ticket *existing_ticket) |
void | BeginTicketMutex (TicketMutex *mutex) |
void | EndTicketMutex (TicketMutex *mutex) |
bool | BeginReaderLock (RwLock *lock) |
void | EndReaderLock (RwLock *lock) |
void | BeginWriterLock (RwLock *lock) |
void | EndWriterLock (RwLock *lock) |
template<typename T > | |
T * | PushStruct (Arena *arena, size_t alignment=8) |
template<typename T > | |
T * | PushClearedStruct (Arena *arena, size_t alignment=8) |
template<typename T > | |
T * | PushArray (Arena *arena, int count, size_t alignment=8) |
template<typename T > | |
T * | PushClearedArray (Arena *arena, int count, size_t alignment=8) |
template<typename T > | |
T * | HeapPushStruct (Heap *heap) |
template<typename T > | |
T * | HeapPushArray (Heap *heap, u32 count) |
bool | operator!= (const TargetID &lhs, const TargetID &rhs) |
static bool | IsNameTooLong (const std::string &name, size_t max) |
bool | IsBlobNameTooLong (const std::string &name) |
bool | IsBucketNameTooLong (const std::string &name) |
bool | IsVBucketNameTooLong (const std::string &name) |
static bool | IsNullId (u64 id) |
bool | IsNullBucketId (BucketID id) |
bool | IsNullVBucketId (VBucketID id) |
bool | IsNullBlobId (BlobID id) |
bool | IsNullTargetId (TargetID id) |
static u32 | GetBlobNodeId (BlobID id) |
void | LocalPut (MetadataManager *mdm, const char *key, u64 val, MapType map_type) |
void | LocalPut (MetadataManager *mdm, BlobID key, const BlobInfo &value) |
u64 | LocalGet (MetadataManager *mdm, const char *key, MapType map_type) |
void | LocalDelete (MetadataManager *mdm, BlobID key) |
void | LocalDelete (MetadataManager *mdm, const char *key, MapType map_type) |
MetadataManager * | GetMetadataManagerFromContext (SharedMemoryContext *context) |
static void | MetadataArenaErrorHandler () |
u32 | HashString (MetadataManager *mdm, RpcContext *rpc, const char *str) |
u64 | GetId (SharedMemoryContext *context, RpcContext *rpc, const char *name, MapType map_type) |
BucketID | GetBucketId (SharedMemoryContext *context, RpcContext *rpc, const char *name) |
BucketID | LocalGetBucketId (SharedMemoryContext *context, const char *name) |
VBucketID | GetVBucketId (SharedMemoryContext *context, RpcContext *rpc, const char *name) |
VBucketID | LocalGetVBucketId (SharedMemoryContext *context, const char *name) |
std::string | MakeInternalBlobName (const std::string &name, BucketID id) |
BlobID | GetBlobId (SharedMemoryContext *context, RpcContext *rpc, const std::string &name, BucketID bucket_id, bool track_stats) |
void | PutId (MetadataManager *mdm, RpcContext *rpc, const std::string &name, u64 id, MapType map_type) |
void | PutBucketId (MetadataManager *mdm, RpcContext *rpc, const std::string &name, BucketID id) |
void | LocalPutBucketId (MetadataManager *mdm, const std::string &name, BucketID id) |
void | PutVBucketId (MetadataManager *mdm, RpcContext *rpc, const std::string &name, VBucketID id) |
void | LocalPutVBucketId (MetadataManager *mdm, const std::string &name, VBucketID id) |
void | PutBlobId (MetadataManager *mdm, RpcContext *rpc, const std::string &name, BlobID id, BucketID bucket_id) |
void | DeleteId (MetadataManager *mdm, RpcContext *rpc, const std::string &name, MapType map_type) |
void | DeleteBucketId (MetadataManager *mdm, RpcContext *rpc, const std::string &name) |
void | DeleteVBucketId (MetadataManager *mdm, RpcContext *rpc, const std::string &name) |
void | LocalDeleteBlobInfo (MetadataManager *mdm, BlobID blob_id) |
void | LocalDeleteBlobId (MetadataManager *mdm, const std::string &name, BucketID bucket_id) |
void | DeleteBlobId (MetadataManager *mdm, RpcContext *rpc, const std::string &name, BucketID bucket_id) |
BucketInfo * | LocalGetBucketInfoByIndex (MetadataManager *mdm, u32 index) |
std::string | LocalGetBlobNameFromId (SharedMemoryContext *context, BlobID blob_id) |
std::string | GetBlobNameFromId (SharedMemoryContext *context, RpcContext *rpc, BlobID blob_id) |
u64 | HexStringToU64 (const std::string &s) |
BucketID | LocalGetBucketIdFromBlobId (SharedMemoryContext *context, BlobID id) |
BucketID | GetBucketIdFromBlobId (SharedMemoryContext *context, RpcContext *rpc, BlobID id) |
BucketInfo * | LocalGetBucketInfoById (MetadataManager *mdm, BucketID id) |
std::vector< BlobID > | GetBlobIds (SharedMemoryContext *context, RpcContext *rpc, BucketID bucket_id) |
VBucketInfo * | GetVBucketInfoByIndex (MetadataManager *mdm, u32 index) |
BucketID | LocalGetNextFreeBucketId (SharedMemoryContext *context, const std::string &name) |
BucketID | LocalGetOrCreateBucketId (SharedMemoryContext *context, const std::string &name) |
BucketID | GetOrCreateBucketId (SharedMemoryContext *context, RpcContext *rpc, const std::string &name) |
VBucketID | LocalGetNextFreeVBucketId (SharedMemoryContext *context, const std::string &name) |
VBucketID | LocalGetOrCreateVBucketId (SharedMemoryContext *context, const std::string &name) |
VBucketID | GetOrCreateVBucketId (SharedMemoryContext *context, RpcContext *rpc, const std::string &name) |
void | CopyIds (u64 *dest, u64 *src, u32 count) |
void | ReplaceBlobIdInBucket (SharedMemoryContext *context, RpcContext *rpc, BucketID bucket_id, BlobID old_blob_id, BlobID new_blob_id) |
void | AddBlobIdToBucket (MetadataManager *mdm, RpcContext *rpc, BlobID blob_id, BucketID bucket_id) |
void | AddBlobIdToVBucket (MetadataManager *mdm, RpcContext *rpc, BlobID blob_id, VBucketID vbucket_id) |
u32 | AllocateBufferIdList (SharedMemoryContext *context, RpcContext *rpc, u32 target_node, const std::vector< BufferID > &buffer_ids) |
bool | BlobIsInSwap (BlobID id) |
void | GetBufferIdList (Arena *arena, SharedMemoryContext *context, RpcContext *rpc, BlobID blob_id, BufferIdArray *buffer_ids) |
std::vector< BufferID > | GetBufferIdList (SharedMemoryContext *context, RpcContext *rpc, BlobID blob_id) |
BufferIdArray | GetBufferIdsFromBlobId (Arena *arena, SharedMemoryContext *context, RpcContext *rpc, BlobID blob_id, u32 **sizes) |
void | LocalCreateBlobMetadata (SharedMemoryContext *context, MetadataManager *mdm, const std::string &blob_name, BlobID blob_id, TargetID effective_target) |
void | CreateBlobMetadata (SharedMemoryContext *context, RpcContext *rpc, const std::string &blob_name, BlobID blob_id, TargetID effective_target) |
void | AttachBlobToBucket (SharedMemoryContext *context, RpcContext *rpc, const char *blob_name, BucketID bucket_id, const std::vector< BufferID > &buffer_ids, TargetID effective_target, bool is_swap_blob, bool called_from_buffer_organizer) |
void | FreeBufferIdList (SharedMemoryContext *context, RpcContext *rpc, BlobID blob_id) |
void | LocalDeleteBlobMetadata (MetadataManager *mdm, const char *blob_name, BlobID blob_id, BucketID bucket_id) |
void | WaitForOutstandingBlobOps (MetadataManager *mdm, BlobID blob_id) |
void | LocalDestroyBlobByName (SharedMemoryContext *context, RpcContext *rpc, const char *blob_name, BlobID blob_id, BucketID bucket_id) |
void | LocalDestroyBlobById (SharedMemoryContext *context, RpcContext *rpc, BlobID blob_id, BucketID bucket_id) |
void | RemoveBlobFromBucketInfo (SharedMemoryContext *context, RpcContext *rpc, BucketID bucket_id, BlobID blob_id) |
void | DestroyBlobByName (SharedMemoryContext *context, RpcContext *rpc, BucketID bucket_id, const std::string &blob_name) |
void | RenameBlob (SharedMemoryContext *context, RpcContext *rpc, const std::string &old_name, const std::string &new_name, BucketID bucket_id) |
bool | ContainsBlob (SharedMemoryContext *context, RpcContext *rpc, BucketID bucket_id, const std::string &blob_name) |
void | DestroyBlobById (SharedMemoryContext *context, RpcContext *rpc, BlobID id, BucketID bucket_id) |
bool | DestroyBucket (SharedMemoryContext *context, RpcContext *rpc, const char *name, BucketID bucket_id) |
bool | DestroyVBucket (SharedMemoryContext *context, RpcContext *rpc, const char *name, VBucketID vbucket_id) |
void | LocalRenameBucket (SharedMemoryContext *context, RpcContext *rpc, BucketID id, const std::string &old_name, const std::string &new_name) |
void | RenameBucket (SharedMemoryContext *context, RpcContext *rpc, BucketID id, const std::string &old_name, const std::string &new_name) |
void | LocalIncrementRefcount (SharedMemoryContext *context, BucketID id) |
void | LocalDecrementRefcount (SharedMemoryContext *context, BucketID id) |
void | DecrementRefcount (SharedMemoryContext *context, RpcContext *rpc, BucketID id) |
u64 | LocalGetRemainingTargetCapacity (SharedMemoryContext *context, TargetID id) |
SystemViewState * | GetLocalSystemViewState (MetadataManager *mdm) |
SystemViewState * | GetLocalSystemViewState (SharedMemoryContext *context) |
std::vector< u64 > | LocalGetGlobalDeviceCapacities (SharedMemoryContext *context) |
std::vector< u64 > | GetGlobalDeviceCapacities (SharedMemoryContext *context, RpcContext *rpc) |
GlobalSystemViewState * | GetGlobalSystemViewState (SharedMemoryContext *context) |
std::vector< ViolationInfo > | LocalUpdateGlobalSystemViewState (SharedMemoryContext *context, u32 node_id, std::vector< i64 > adjustments) |
void | UpdateGlobalSystemViewState (SharedMemoryContext *context, RpcContext *rpc) |
TargetID | FindTargetIdFromDeviceId (const std::vector< TargetID > &targets, DeviceID device_id) |
static ptrdiff_t | GetOffsetFromMdm (MetadataManager *mdm, void *ptr) |
SystemViewState * | CreateSystemViewState (Arena *arena, Config *config) |
GlobalSystemViewState * | CreateGlobalSystemViewState (RpcContext *rpc, Arena *arena, Config *config) |
std::string | GetSwapFilename (MetadataManager *mdm, u32 node_id) |
std::vector< BufferID > | SwapBlobToVec (SwapBlob swap_blob) |
SwapBlob | VecToSwapBlob (std::vector< BufferID > &vec) |
SwapBlob | IdArrayToSwapBlob (BufferIdArray ids) |
void | InitMetadataManager (MetadataManager *mdm, RpcContext *rpc, Arena *arena, Config *config) |
VBucketInfo * | LocalGetVBucketInfoByIndex (MetadataManager *mdm, u32 index) |
VBucketInfo * | LocalGetVBucketInfoById (MetadataManager *mdm, VBucketID id) |
void | LocalIncrementRefcount (SharedMemoryContext *context, VBucketID id) |
void | LocalDecrementRefcount (SharedMemoryContext *context, VBucketID id) |
void | DecrementRefcount (SharedMemoryContext *context, RpcContext *rpc, VBucketID id) |
u32 | GetRelativeNodeId (RpcContext *rpc, int offset) |
u32 | GetNextNode (RpcContext *rpc) |
u32 | GetPreviousNode (RpcContext *rpc) |
std::vector< TargetID > | GetNodeTargets (SharedMemoryContext *context, RpcContext *rpc, u32 target_node) |
std::vector< TargetID > | GetNeighborhoodTargets (SharedMemoryContext *context, RpcContext *rpc) |
u64 | GetRemainingTargetCapacity (SharedMemoryContext *context, RpcContext *rpc, TargetID target_id) |
std::vector< u64 > | GetRemainingTargetCapacities (SharedMemoryContext *context, RpcContext *rpc, const std::vector< TargetID > &targets) |
void | AttachBlobToVBucket (SharedMemoryContext *context, RpcContext *rpc, const char *blob_name, const char *bucket_name, VBucketID vbucket_id) |
std::string | LocalGetBucketNameById (SharedMemoryContext *context, BucketID blob_id) |
std::vector< BlobID > | GetBlobsFromVBucketInfo (SharedMemoryContext *context, RpcContext *rpc, VBucketID vbucket_id) |
void | RemoveBlobFromVBucketInfo (SharedMemoryContext *context, RpcContext *rpc, VBucketID vbucket_id, const char *blob_name, const char *bucket_name) |
std::string | GetBucketNameById (SharedMemoryContext *context, RpcContext *rpc, BucketID id) |
f32 | ScoringFunction (MetadataManager *mdm, Stats *stats) |
int | LocalGetNumOutstandingFlushingTasks (SharedMemoryContext *context, VBucketID id) |
int | GetNumOutstandingFlushingTasks (SharedMemoryContext *context, RpcContext *rpc, VBucketID id) |
bool | LocalLockBlob (SharedMemoryContext *context, BlobID blob_id) |
bool | LocalUnlockBlob (SharedMemoryContext *context, BlobID blob_id) |
void | GetPidTid (u32 &pid, u32 &tid) |
bool | LockBlob (SharedMemoryContext *context, RpcContext *rpc, BlobID blob_id) |
bool | UnlockBlob (SharedMemoryContext *context, RpcContext *rpc, BlobID blob_id) |
void | MakeShmemString (ShmemString *sms, u8 *memory, const char *val, u32 size) |
void | MakeShmemString (ShmemString *sms, u8 *memory, const std::string &val) |
std::string | GetShmemString (ShmemString *sms) |
void | InitNeighborhoodTargets (SharedMemoryContext *context, RpcContext *rpc) |
void | BeginGlobalTicketMutex (SharedMemoryContext *context, RpcContext *rpc) |
void | EndGlobalTicketMutex (SharedMemoryContext *context, RpcContext *rpc) |
void | LocalBeginGlobalTicketMutex (MetadataManager *mdm) |
void | LocalEndGlobalTicketMutex (MetadataManager *mdm) |
void | IncrementBlobStats (SharedMemoryContext *context, RpcContext *rpc, BlobID blob_id) |
void | LocalIncrementBlobStats (MetadataManager *mdm, BlobID blob_id) |
void | LocalReplaceBlobIdInBucket (SharedMemoryContext *context, BucketID bucket_id, BlobID old_blob_id, BlobID new_blob_id) |
TicketMutex * | GetMapMutex (MetadataManager *mdm, MapType map_type) |
void | LocalAddBlobIdToBucket (MetadataManager *mdm, BucketID bucket_id, BlobID blob_id, bool track_stats=true) |
void | LocalAddBlobIdToVBucket (MetadataManager *mdm, VBucketID vbucket_id, BlobID blob_id) |
std::vector< BufferID > | LocalGetBufferIdList (MetadataManager *mdm, BlobID blob_id) |
void | LocalGetBufferIdList (Arena *arena, MetadataManager *mdm, BlobID blob_id, BufferIdArray *buffer_ids) |
void | LocalFreeBufferIdList (SharedMemoryContext *context, BlobID blob_id) |
bool | LocalDestroyBucket (SharedMemoryContext *context, RpcContext *rpc, const char *bucket_name, BucketID bucket_id) |
bool | LocalDestroyVBucket (SharedMemoryContext *context, const char *vbucket_name, VBucketID vbucket_id) |
u32 | LocalAllocateBufferIdList (MetadataManager *mdm, const std::vector< BufferID > &buffer_ids) |
bool | LocalContainsBlob (SharedMemoryContext *context, BucketID bucket_id, BlobID blob_id) |
void | LocalRemoveBlobFromBucketInfo (SharedMemoryContext *context, BucketID bucket_id, BlobID blob_id) |
void | StartGlobalSystemViewStateUpdateThread (SharedMemoryContext *context, RpcContext *rpc, Arena *arena, double sleep_ms) |
void | InitMetadataStorage (SharedMemoryContext *context, MetadataManager *mdm, Arena *arena, Config *config) |
std::vector< BlobID > | LocalGetBlobIds (SharedMemoryContext *context, BucketID bucket_id) |
std::vector< TargetID > | LocalGetNodeTargets (SharedMemoryContext *context) |
f32 | LocalGetBlobImportanceScore (SharedMemoryContext *context, BlobID blob_id) |
void | LocalRemoveBlobFromVBucketInfo (SharedMemoryContext *context, VBucketID vbucket_id, BlobID blob_id) |
std::vector< BlobID > | LocalGetBlobsFromVBucketInfo (SharedMemoryContext *context, VBucketID vbucket_id) |
Heap * | GetIdHeap (MetadataManager *mdm) |
Heap * | GetMapHeap (MetadataManager *mdm) |
IdList | AllocateIdList (MetadataManager *mdm, u32 length) |
void | FreeIdList (MetadataManager *mdm, IdList id_list) |
u32 | AppendToChunkedIdList (MetadataManager *mdm, ChunkedIdList *id_list, u64 id) |
void | PutToStorage (MetadataManager *mdm, const char *key, u64 val, MapType map_type) |
void | PutToStorage (MetadataManager *mdm, BlobID key, const BlobInfo &val) |
u64 | GetFromStorage (MetadataManager *mdm, const char *key, MapType map_type) |
std::string | ReverseGetFromStorage (MetadataManager *mdm, u64 id, MapType map_type) |
void | DeleteFromStorage (MetadataManager *mdm, BlobID key, bool lock) |
void | DeleteFromStorage (MetadataManager *mdm, const char *key, MapType map_type) |
u32 | HashStringForStorage (MetadataManager *mdm, RpcContext *rpc, const char *str) |
void | SeedHashForStorage (size_t seed) |
size_t | GetStoredMapSize (MetadataManager *mdm, MapType map_type) |
std::vector< TargetID > | LocalGetNeighborhoodTargets (SharedMemoryContext *context) |
BlobInfo * | GetBlobInfoPtr (MetadataManager *mdm, BlobID blob_id) |
void | ReleaseBlobInfoPtr (MetadataManager *mdm) |
u64 * | GetIdsPtr (MetadataManager *mdm, IdList id_list) |
u64 * | GetIdsPtr (MetadataManager *mdm, ChunkedIdList id_list) |
void | ReleaseIdsPtr (MetadataManager *mdm) |
std::vector< u64 > | GetChunkedIdList (MetadataManager *mdm, ChunkedIdList id_list) |
static IdMap * | GetMapByOffset (MetadataManager *mdm, u32 offset) |
static IdMap * | GetBucketMap (MetadataManager *mdm) |
static IdMap * | GetVBucketMap (MetadataManager *mdm) |
static IdMap * | GetBlobIdMap (MetadataManager *mdm) |
void | CheckHeapOverlap (MetadataManager *mdm) |
IdMap * | GetMap (MetadataManager *mdm, MapType map_type) |
BlobInfoMap * | GetBlobInfoMapNoLock (MetadataManager *mdm) |
BlobInfoMap * | GetBlobInfoMap (MetadataManager *mdm) |
void | ReleaseMap (MetadataManager *mdm, MapType map_type) |
Stats | LocalGetBlobStats (SharedMemoryContext *context, BlobID blob_id) |
IdList | GetEmbeddedIdList (MetadataManager *mdm, u32 offset) |
BufferID * | GetBufferIdsPtrFromBlobId (MetadataManager *mdm, BlobID blob_id, size_t &length) |
static char * | GetKey (MetadataManager *mdm, IdMap *map, u32 index) |
template<typename T > | |
void | FreeIdList (MetadataManager *mdm, T id_list) |
void | FreeEmbeddedIdList (MetadataManager *mdm, u32 offset) |
void | AllocateOrGrowIdList (MetadataManager *mdm, ChunkedIdList *id_list) |
u64 | GetChunkedIdListElement (MetadataManager *mdm, ChunkedIdList *id_list, u32 index) |
void | SetChunkedIdListElement (MetadataManager *mdm, ChunkedIdList *id_list, u32 index, u64 value) |
i64 | GetIndexOfId (MetadataManager *mdm, ChunkedIdList *id_list, u64 id) |
u32 | AllocateEmbeddedIdList (MetadataManager *mdm, u32 length) |
static bool | HasAllocated (ChunkedIdList *list) |
static bool | HasAllocatedBlobs (VBucketInfo *info) |
static bool | HasAllocatedBlobs (BucketInfo *info) |
std::vector< TargetID > | LocalGetTargets (SharedMemoryContext *context, IdList target_list) |
void | InitSwapSpaceFilename (MetadataManager *mdm, Arena *arena, Config *config) |
void | InitRpcContext (RpcContext *rpc, u32 num_nodes, u32 node_id, Config *config) |
void * | CreateRpcState (Arena *arena) |
void | InitRpcClients (RpcContext *rpc) |
void | ShutdownRpcClients (RpcContext *rpc) |
void | RunDaemon (SharedMemoryContext *context, RpcContext *rpc, CommunicationContext *comm, Arena *trans_arena, const char *shmem_name) |
void | FinalizeClient (SharedMemoryContext *context, RpcContext *rpc, CommunicationContext *comm, Arena *trans_arena, bool stop_daemon) |
void | FinalizeRpcContext (RpcContext *rpc, bool is_daemon) |
std::string | GetServerName (RpcContext *rpc, u32 node_id, bool is_buffer_organizer=false) |
std::string | GetProtocol (RpcContext *rpc) |
void | StartBufferOrganizer (SharedMemoryContext *context, RpcContext *rpc, Arena *arena, const char *addr, int num_threads, int port) |
void | CopyStringToCharArray (const std::string &src, char *dest, size_t max) |
void | ThalliumStartRpcServer (SharedMemoryContext *context, RpcContext *rpc, Arena *arena, const char *addr, i32 num_rpc_threads) |
void | StopGlobalSystemViewStateUpdateThread (RpcContext *rpc) |
std::string | GetHostNameFromNodeId (RpcContext *rpc, u32 node_id) |
std::string | GetRpcAddress (RpcContext *rpc, Config *config, u32 node_id, int port) |
size_t | BulkRead (RpcContext *rpc, u32 node_id, const char *func_name, u8 *data, size_t max_size, BufferID id) |
template<typename A > | |
void | serialize (A &ar, BufferID &buffer_id) |
template<typename A > | |
void | serialize (A &ar, BucketID &bucket_id) |
template<typename A > | |
void | serialize (A &ar, VBucketID &vbucket_id) |
template<typename A > | |
void | serialize (A &ar, BlobID &blob_id) |
template<typename A > | |
void | serialize (A &ar, TargetID &target_id) |
template<typename A > | |
void | serialize (A &ar, SwapBlob &swap_blob) |
template<typename A > | |
void | serialize (A &ar, BufferInfo &info) |
template<typename A > | |
void | save (A &ar, MapType &map_type) |
template<typename A > | |
void | load (A &ar, MapType &map_type) |
template<typename A > | |
void | save (A &ar, BoPriority &priority) |
template<typename A > | |
void | load (A &ar, BoPriority &priority) |
template<typename A > | |
void | save (A &ar, ThresholdViolation &violation) |
template<typename A > | |
void | load (A &ar, ThresholdViolation &violation) |
template<typename A > | |
void | save (A &ar, BoOperation &op) |
template<typename A > | |
void | load (A &ar, BoOperation &op) |
template<typename A > | |
void | serialize (A &ar, BoArgs &bo_args) |
template<typename A > | |
void | serialize (A &ar, BoTask &bo_task) |
template<typename A > | |
void | serialize (A &ar, ViolationInfo &info) |
static ThalliumState * | GetThalliumState (RpcContext *rpc) |
static ClientThalliumState * | GetClientThalliumState (RpcContext *rpc) |
static bool | IsBoFunction (const char *func_name) |
template<typename ReturnType , typename... Ts> | |
ReturnType | RpcCall (RpcContext *rpc, u32 node_id, const char *func_name, Ts... args) |
size_t | RoundUpToMultiple (size_t val, size_t multiple) |
size_t | RoundDownToMultiple (size_t val, size_t multiple) |
void | InitDefaultConfig (Config *config) |
void | FailedLibraryCall (std::string func) |
Variables | |
const int | kGlobalDebugMaxAllocations = KILOBYTES(64) |
DebugState * | global_debug_id_state |
DebugState * | global_debug_map_state |
char | global_debug_map_name [] = "/hermes_debug_map_heap" |
char | global_debug_id_name [] = "/hermes_debug_id_heap" |
const size_t | kDefaultCoeffs = 1000 + 1 |
static constexpr int | kMaxBufferPoolSlabs = 8 |
constexpr int | kMaxPathLength = 256 |
constexpr int | kMaxBufferPoolShmemNameLength = 64 |
constexpr int | kMaxDevices = 8 |
constexpr int | kMaxBucketNameSize = 256 |
constexpr int | kMaxVBucketNameSize = 256 |
constexpr char | kPlaceInHierarchy [] = "PlaceInHierarchy" |
const TargetID | kSwapTargetId = {{0, 0, 0}} |
constexpr int | kBucketIdStringSize = sizeof(BucketID) * 2 |
constexpr int | kMaxBlobNameSize = 64 - kBucketIdStringSize |
const int | kAttemptsBeforeYield = 100 |
static const u64 | hextable [] |
static const u32 | kGlobalMutexNodeId = 1 |
const int | kIdListChunkSize = 10 |
static constexpr int | kMaxTraitsPerVBucket = 8 |
const int | kMaxServerNameSize = 128 |
const int | kMaxServerSuffixSize = 16 |
const int | kMaxServerNamePrefix = 32 |
const int | kMaxServerNamePostfix = 8 |
const char | kBoPrefix [] = "BO::" |
const int | kBoPrefixLength = sizeof(kBoPrefix) - 1 |
Make a class singleton when used with the class. format for class name T Singleton<T>::GetInstance()
T |
using hermes::BoMoveList = typedef std::vector<std::pair<BufferID, std::vector<BufferID> >> |
move list for buffer organizer
typedef void(* hermes::BarrierFunc) (void *) |
MPI barrier function pointer
typedef void(* hermes::FinalizeFunc) (void *) |
MPI finalize function pointer
typedef uint8_t hermes::u8 |
8-bit unsigned integer
typedef uint16_t hermes::u16 |
16-bit unsigned integer
typedef uint32_t hermes::u32 |
32-bit unsigned integer
typedef uint64_t hermes::u64 |
64-bit unsigned integer
typedef int8_t hermes::i8 |
8-bit signed integer
typedef int16_t hermes::i16 |
16-bit signed integer
typedef int32_t hermes::i32 |
32-bit signed integer
typedef int64_t hermes::i64 |
64-bit signed integer
typedef float hermes::f32 |
32-bit float
typedef double hermes::f64 |
64-bit float
typedef u16 hermes::DeviceID |
device id in unsigned 16-bit integer
using hermes::PlacementSchema = typedef std::vector<std::pair<size_t, TargetID> > |
A PlacementSchema is a vector of (size, target) pairs where size is the number of bytes to buffer and target is the TargetID where to buffer those bytes.
typedef u64 hermes::TraitID |
Trait ID type
typedef void() hermes::ArenaErrorFunc() |
Arena error function
typedef void(* hermes::StartFunc) (SharedMemoryContext *, RpcContext *, Arena *, const char *, int) |
start function for RPC server
|
strong |
buffer organizer operations
|
strong |
buffer organizer priorities
An enum to represent swap BLOB members
enum hermes::Topology |
topology
enum hermes::StatusCode |
Hermes status codes.
|
strong |
enum hermes::ArenaType |
Arena types
Enumerator | |
---|---|
kArenaType_BufferPool | Buffer pool: This must always be first! |
kArenaType_MetaData | Metadata |
kArenaType_Transient | Scratch space |
kArenaType_Count | Sentinel value |
enum hermes::MapType |
map type
|
strong |
min/max threshold violation
get arena information from config configuration
std::vector<std::string> hermes::GetHostsFromFile | ( | const std::string & | host_file | ) |
get hosts from host_file file
void hermes::PushHostNames | ( | Arena * | arenas, |
RpcContext * | rpc, | ||
const std::vector< std::string > & | host_names, | ||
MetadataManager * | mdm, | ||
u8 * | shmem_base | ||
) |
push host names
SharedMemoryContext hermes::InitHermesCore | ( | Config * | config, |
CommunicationContext * | comm, | ||
ArenaInfo * | arena_info, | ||
Arena * | arenas, | ||
RpcContext * | rpc | ||
) |
initialize Hermes core
SharedMemoryContext hermes::BootstrapSharedMemory | ( | Arena * | arenas, |
Config * | config, | ||
CommunicationContext * | comm, | ||
RpcContext * | rpc, | ||
bool | is_daemon, | ||
bool | is_adapter | ||
) |
boostrap shared memory
std::shared_ptr< api::Hermes > hermes::InitHermes | ( | Config * | config, |
bool | is_daemon = false , |
||
bool | is_adapter = false |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Allows programatically generating configurations.
config | a pointer to configuration |
is_daemon | a flag to run Hermes as a daemon |
is_adapter | a flag to run Hermes in adapter mode |
std::shared_ptr< api::Hermes > hermes::InitHermesClient | ( | const char * | config_file = NULL | ) |
Initialize a Hermes instance as a client or adapter.
config_file | The (relative or absolute) path to a hermes configuration file |
std::shared_ptr< api::Hermes > hermes::InitHermesDaemon | ( | char * | config_file = NULL | ) |
Initialize a Hermes instance as a daemon.
A Hermes daemon is one or more processes (one per node) that handle all Hermes background services. This includes RPC servers, thread pools, buffer organization, and SystemViewState updates. A daemon is necessary in workflows that involve 2 or more applications sharing buffered data. Without a daemon, (i.e., co-deploying Hermes services with an application) the lifetime of Hermes is tied to the app.
config_file | The (relative or absolute) path to a hermes configuration file |
std::shared_ptr< api::Hermes > hermes::InitHermesDaemon | ( | Config * | config | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
config | A valid Config. |
bool hermes::operator== | ( | const BufferInfo & | lhs, |
const BufferInfo & | rhs | ||
) |
comparison operator
BufferInfo hermes::LocalGetBufferInfo | ( | SharedMemoryContext * | context, |
BufferID | buffer_id | ||
) |
get buffer information locally
BufferInfo hermes::GetBufferInfo | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
BufferID | buffer_id | ||
) |
get buffer information
f32 hermes::NormalizeAccessScore | ( | SharedMemoryContext * | context, |
f32 | raw_score, | ||
f32 | size_mb | ||
) |
normalize access score from raw-score using size_mb
|
inlinestatic |
< MB
std::vector< BufferInfo > hermes::GetBufferInfo | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
const std::vector< BufferID > & | buffer_ids | ||
) |
get buffer information
f32 hermes::ComputeBlobAccessScore | ( | SharedMemoryContext * | context, |
const std::vector< BufferInfo > & | buffer_info | ||
) |
compute BLOB access score
void hermes::SortBufferInfo | ( | std::vector< BufferInfo > & | buffer_info, |
bool | increasing | ||
) |
sort buffer information
void hermes::SortTargetInfo | ( | std::vector< TargetInfo > & | target_info, |
bool | increasing | ||
) |
sort target information
void hermes::EnqueueBoMove | ( | RpcContext * | rpc, |
const BoMoveList & | moves, | ||
BlobID | blob_id, | ||
BucketID | bucket_id, | ||
const std::string & | internal_name, | ||
BoPriority | priority | ||
) |
enqueue buffer organizer move list
void hermes::LocalEnqueueBoMove | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
const BoMoveList & | moves, | ||
BlobID | blob_id, | ||
BucketID | bucket_id, | ||
const std::string & | internal_blob_name, | ||
BoPriority | priority | ||
) |
enqueue buffer organizer move list locally
void hermes::BoMove | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
const BoMoveList & | moves, | ||
BlobID | blob_id, | ||
BucketID | bucket_id, | ||
const std::string & | internal_blob_name | ||
) |
Assumes all BufferIDs in destinations are local
void hermes::LocalOrganizeBlob | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
const std::string & | internal_blob_name, | ||
BucketID | bucket_id, | ||
f32 | epsilon, | ||
f32 | explicit_importance_score | ||
) |
organize BLOB locally
void hermes::OrganizeBlob | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
BucketID | bucket_id, | ||
const std::string & | blob_name, | ||
f32 | epsilon, | ||
f32 | importance_score = -1 |
||
) |
organize BLOB
void hermes::EnforceCapacityThresholds | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
ViolationInfo | info | ||
) |
enforce capacity threholds
void hermes::LocalEnforceCapacityThresholds | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
ViolationInfo | info | ||
) |
enforce capacity threholds locally
void hermes::LocalShutdownBufferOrganizer | ( | SharedMemoryContext * | context | ) |
shut down buffer organizer locally
void hermes::FlushBlob | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
BlobID | blob_id, | ||
const std::string & | filename, | ||
u64 | offset, | ||
bool | async | ||
) |
< KB
bool hermes::EnqueueFlushingTask | ( | RpcContext * | rpc, |
BlobID | blob_id, | ||
const std::string & | filename, | ||
u64 | offset | ||
) |
enqueue flushing task
bool hermes::LocalEnqueueFlushingTask | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
BlobID | blob_id, | ||
const std::string & | filename, | ||
u64 | offset | ||
) |
enqueue flushing task locally
api::Status hermes::PlaceInHierarchy | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
SwapBlob | swap_blob, | ||
const std::string & | name, | ||
const api::Context & | ctx | ||
) |
place BLOBs in hierarchy
void hermes::LocalAdjustFlushCount | ( | SharedMemoryContext * | context, |
const std::string & | vbkt_name, | ||
int | adjustment | ||
) |
adjust flush coun locally
void hermes::LocalIncrementFlushCount | ( | SharedMemoryContext * | context, |
const std::string & | vbkt_name | ||
) |
increment flush count locally
void hermes::LocalDecrementFlushCount | ( | SharedMemoryContext * | context, |
const std::string & | vbkt_name | ||
) |
decrement flush count locally
void hermes::IncrementFlushCount | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
const std::string & | vbkt_name | ||
) |
increment flush count
void hermes::DecrementFlushCount | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
const std::string & | vbkt_name | ||
) |
decrement flush count
void hermes::AwaitAsyncFlushingTasks | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
VBucketID | id | ||
) |
await asynchronous flushing tasks
void hermes::OrganizeDevice | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
DeviceID | devices_id | ||
) |
organize device
void hermes::Finalize | ( | SharedMemoryContext * | context, |
CommunicationContext * | comm, | ||
RpcContext * | rpc, | ||
const char * | shmem_name, | ||
Arena * | trans_arena, | ||
bool | is_application_core, | ||
bool | force_rpc_shutdown | ||
) |
Free all resources held by Hermes.
context | The Hermes instance's shared memory context. |
comm | The Hermes instance's communication context. |
rpc | The Hermes instance's RPC context. |
shmem_name | The name of the shared memory. |
trans_arena | The instance's transient arena. |
is_application_core | Whether or not this rank is an app rank. |
force_rpc_shutdown | Force RPC shutdown when it is true. |
void hermes::LockBuffer | ( | BufferHeader * | header | ) |
Lock header buffer.
void hermes::UnlockBuffer | ( | BufferHeader * | header | ) |
Unlock header buffer.
BufferPool * hermes::GetBufferPoolFromContext | ( | SharedMemoryContext * | context | ) |
Obtains a pointer to the BufferPool constructed in shared memory.
Since the BufferPool lives in shared memory, this pointer should never be freed. It is only destroyed when the Hermes core closes the shared memory.
context | The shared memory context for accessing the BufferPool. |
context
. Device * hermes::GetDeviceFromHeader | ( | SharedMemoryContext * | context, |
BufferHeader * | header | ||
) |
Get Device from context SharedMemoryContext and header BufferHeader
Target * hermes::GetTarget | ( | SharedMemoryContext * | context, |
int | index | ||
) |
Get Target from context SharedMemoryContext and index index.
Target * hermes::GetTargetFromId | ( | SharedMemoryContext * | context, |
TargetID | id | ||
) |
Get Target from context SharedMemoryContext and id TargetID.
std::vector< f32 > hermes::GetBandwidths | ( | SharedMemoryContext * | context, |
const std::vector< TargetID > & | targets | ||
) |
Returns a vector of bandwidths in MiB per second for a given Target list.
Element n
of the result is the bandwidth of the Device that backs the nth
element of targets
.
context | The shared memory context needed to access BufferPool info. |
targets | The list of targets for which to retrieve bandwidth info. |
targets
, in MiB/sec. Device * hermes::GetDeviceById | ( | SharedMemoryContext * | context, |
DeviceID | device_id | ||
) |
Returns a pointer to the Device with index device_id in the shared memory context.
This pointer should never be freed, since it lives in shared memory and is managed by the Hermes core.
context | The shared memory context where the Devices are stored. |
device_id | An identifier for the desired Device. This is an index into an array of Devices. |
BufferHeader * hermes::GetHeadersBase | ( | SharedMemoryContext * | context | ) |
Returns a pointer to the first BufferHeader in the array of BufferHeaders constructed in the shared memory context.
This pointer should never be freed, as it is managed by the Hermes core. Indexing off this pointer, one can easily iterate through all BufferHeaders. When retrieving a specific header, use GetHeaderByBufferId.
Example:
context | The shared memory context where the BufferHeaders live. |
|
inline |
Get BufferHeader from context SharedMemoryContext and index index.
BufferHeader * hermes::GetHeaderByBufferId | ( | SharedMemoryContext * | context, |
BufferID | id | ||
) |
Retrieves the BufferHeader that corresponds to BufferID id
.
This pointer should never be freed. The BufferHeaders are managed by the Hermes core.
context | The shared memory context for accessing the BufferHeaders. |
id | The desired BufferID to retrieve. |
id
. void hermes::ResetHeader | ( | BufferHeader * | header | ) |
|
inlinestatic |
Make header BufferHeader dormant by setting capacity to 0.
bool hermes::HeaderIsDormant | ( | BufferHeader * | header | ) |
Returns whether or not header
is currently backed by physical storage.
A dormant header has no storage associated with it. It exists to facilitate the splitting and merging mechanisms. Splitting buffers into smaller buffers requires more headers. When that happens, dormant headers become associated with backing storage, and become "live."
header | The header to check. |
header
is not backed by physical storage, false otherwise. i32 hermes::GetSlabUnitSize | ( | SharedMemoryContext * | context, |
DeviceID | device_id, | ||
int | slab_index | ||
) |
Get slab unit size from context SharedMemoryContext, device_id Device ID, and slab_index slab index.
i32 hermes::GetSlabBufferSize | ( | SharedMemoryContext * | context, |
DeviceID | device_id, | ||
int | slab_index | ||
) |
Get slab buffer size from context SharedMemoryContext, device_id Device ID, and slab_index slab index.
BufferID* hermes::GetFreeListPtr | ( | SharedMemoryContext * | context, |
DeviceID | device_id | ||
) |
Get BufferID pointer to the free list offset of device_id Device ID from context SharedMemoryContext.
int hermes::GetSlabIndexFromHeader | ( | SharedMemoryContext * | context, |
BufferHeader * | header | ||
) |
Get slab index from context SharedMemoryContext and header BufferHeader.
bool hermes::BufferIsRemote | ( | CommunicationContext * | comm, |
BufferID | buffer_id | ||
) |
Check if node ID of buffer_id BufferID is same as node ID of comm CommunicationContext.
bool hermes::BufferIsRemote | ( | RpcContext * | rpc, |
BufferID | buffer_id | ||
) |
Check if node ID of buffer_id BufferID is same as node ID of rpc RpcContext.
bool hermes::IsNullBufferId | ( | BufferID | id | ) |
bool hermes::BufferIsByteAddressable | ( | SharedMemoryContext * | context, |
BufferID | id | ||
) |
Check if the device with context SharedMemoryContext and buffer_id BufferID is byte-addressable.
BufferID hermes::PeekFirstFreeBufferId | ( | SharedMemoryContext * | context, |
DeviceID | device_id, | ||
int | slab_index | ||
) |
Get the first free BufferID from context SharedMemoryContext, device_id DeviceID, and slab_index slab index.
void hermes::SetFirstFreeBufferId | ( | SharedMemoryContext * | context, |
DeviceID | device_id, | ||
int | slab_index, | ||
BufferID | new_id | ||
) |
Set the value at slab_index slab index of free list from context SharedMemoryContext and device_id DeviceID as new_id BufferID.
std::atomic< u32 > * hermes::GetAvailableBuffersArray | ( | SharedMemoryContext * | context, |
DeviceID | device_id | ||
) |
Get the array of available buffer offsets from context SharedMemoryContext and device_id DeviceID.
|
static |
Get the number of available buffers from context SharedMemoryContext, and device_id DeviceID at slab_index slab index.
u32 hermes::GetNumBuffersAvailable | ( | SharedMemoryContext * | context, |
DeviceID | device_id | ||
) |
Get the number of available buffers from context SharedMemoryContext, and device_id DeviceID.
|
static |
Decrement the number of available buffers at slab_index slab index from context SharedMemoryContext and device_id DeviceID.
|
static |
Increment the number of available buffers at slab_index slab index from context SharedMemoryContext and device_id DeviceID.
void hermes::UpdateBufferingCapacities | ( | SharedMemoryContext * | context, |
i64 | adjustment, | ||
DeviceID | device_id | ||
) |
Update buffering capacities of device_id DeviceID by adjustment from context SharedMemoryContext.
void hermes::LocalReleaseBuffer | ( | SharedMemoryContext * | context, |
BufferID | buffer_id | ||
) |
Release local buffer_id buffer from context SharedMemoryContext.
void hermes::ReleaseBuffer | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
BufferID | buffer_id | ||
) |
Release remote buffer_id buffer from context SharedMemoryContext and rpc RpcContext.
void hermes::ReleaseBuffers | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
const std::vector< BufferID > & | buffer_ids | ||
) |
Release remote buffer_ids buffers from context SharedMemoryContext and rpc RpcContext.
Returns buffer_ids to the BufferPool free lists so that they can be used again. Data in the buffers is considered abandonded, and can be overwritten.
context | The shared memory context where the BufferPool lives. |
rpc | The RPC context to enable a remote call if necessary. |
buffer_ids | The list of buffer_ids to return to the BufferPool. |
void hermes::LocalReleaseBuffers | ( | SharedMemoryContext * | context, |
const std::vector< BufferID > & | buffer_ids | ||
) |
Release local buffer_ids buffers from context SharedMemoryContext.
BufferID hermes::GetFreeBuffer | ( | SharedMemoryContext * | context, |
DeviceID | device_id, | ||
int | slab_index | ||
) |
Get the BufferID of free buffer at slab_index slab index from context SharedMemoryContext and device_id DeviceID.
std::vector< BufferID > hermes::GetBuffers | ( | SharedMemoryContext * | context, |
const PlacementSchema & | schema | ||
) |
Returns a vector of BufferIDs that satisfy the constrains of schema
.
If a request cannot be fulfilled, an empty list is returned. GetBuffers will never partially satisfy a request. It is all or nothing. If schema
includes a remote Device, this function will make an RPC call to get BufferIDs from a remote node.
context | The shared memory context for the BufferPool. |
schema | A description of the amount and Device of storage requested. |
schema
, or an empty vector if the request could not be fulfilled. u32 hermes::LocalGetBufferSize | ( | SharedMemoryContext * | context, |
BufferID | id | ||
) |
Get buffer size from context SharedMemoryContext and id BufferID.
u32 hermes::GetBufferSize | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
BufferID | id | ||
) |
Get remote buffer size from context SharedMemoryContext, rpc RpcContext, and id BufferID.
size_t hermes::GetBlobSize | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
BufferIdArray * | buffer_ids | ||
) |
Get remote BLOB size from context SharedMemoryContext, rpc RpcContext, and buffer_ids BufferIdArray.
size_t hermes::GetBlobSizeById | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
Arena * | arena, | ||
BlobID | blob_id | ||
) |
Get remote BLOB size from context SharedMemoryContext, rpc RpcContext, arena Arena, and blob_id BlobID.
ptrdiff_t hermes::GetBufferOffset | ( | SharedMemoryContext * | context, |
BufferID | id | ||
) |
Get buffer offset of id buffer from context SharedMemoryContext.
u8 * hermes::GetRamBufferPtr | ( | SharedMemoryContext * | context, |
BufferID | buffer_id | ||
) |
Get RAM buffer pointer of id buffer from context SharedMemoryContext.
void hermes::PartitionRamBuffers | ( | Arena * | arena, |
i32 | buffer_size, | ||
i32 | buffer_count, | ||
int | block_size | ||
) |
Partition RAM buffers by block_size for buffer_count buffers with buffer_size size in arena Arena.
BufferID hermes::MakeBufferHeaders | ( | Arena * | arena, |
int | buffer_size, | ||
u32 | start_index, | ||
u32 | end_index, | ||
int | node_id, | ||
DeviceID | device_id, | ||
ptrdiff_t | initial_offset, | ||
u8 ** | header_begin | ||
) |
Make end_index - start_index amount of BufferHeaders.
Initialize devices.
Initialize targets.
void hermes::MergeRamBufferFreeList | ( | SharedMemoryContext * | context, |
int | slab_index | ||
) |
Merge RAM buffer free list.
TODO(chogan):
context | The shared memory context for accessing the BufferPool |
slab_index | The 0-based index of the slab to merge. |
void hermes::SplitRamBufferFreeList | ( | SharedMemoryContext * | context, |
int | slab_index | ||
) |
Split RAM buffer free list.
TODO(chogan):
context | The shared memory context for accessing the BufferPool. |
slab_index | The 0-based index of the slab to split. |
ptrdiff_t hermes::InitBufferPool | ( | u8 * | hermes_memory, |
Arena * | buffer_pool_arena, | ||
Arena * | scratch_arena, | ||
i32 | node_id, | ||
Config * | config | ||
) |
Initializes a BufferPool inside an existing shared memory segment.
Divides the shared memory segment pointed to by hermes_memory into 1) An array of RAM buffers. 2) An array of BufferHeaders. 3) An array of Devices. 4) The BufferPool struct, which contains pointers (really offsets) to the data above.
The sizes of each of these sections is controlled by the config parameter. Each BufferHeader is initialized to point to a specfic offset. In the case of a RAM buffer, this offset is from the beginning of the shared memory. In the case of a file buffer, the offset is from the beginning of a file. Free lists for each slab in each Device are also constructed.
hermes_memory | The base pointer to a shared memory segment. |
buffer_pool_arena | An Arena backed by the shared memory segment pointed to by hermes_shared_memory. |
scratch_arena | An arena for temporary allocations that are destroyed when this function exits. |
node_id | The identifier of the node this function is running on. |
config | Configuration that specifies how the BufferPool is constructed. |
void hermes::SerializeBufferPoolToFile | ( | SharedMemoryContext * | context, |
FILE * | file | ||
) |
Write buffer pool to file file.
void hermes::MakeFullShmemName | ( | char * | dest, |
const char * | base | ||
) |
Constructs a unique (among users) shared memory name from a base name.
Copies the base name into the dest buffer and appends the value of the USER envioronment variable. The dest buffer should be large enough to hold the base name and the value of USER.
[out] | dest | A buffer for the full shared memory name. |
[in] | base | The base shared memory name. |
FILE* hermes::FopenOrTerminate | ( | const char * | fname, |
const char * | mode | ||
) |
Terminate if fopen() call fails. Otherwise, return file pointer.
int hermes::OpenOrTerminate | ( | const std::string & | fname, |
int | flags, | ||
mode_t | mode = 0 |
||
) |
Terminate if open() call fails. Otherwise, return file pointer.
void hermes::InitFilesForBuffering | ( | SharedMemoryContext * | context, |
CommunicationContext & | comm | ||
) |
context
. The file buffering paradaigm uses one file per slab for each Device. If posix_fallocate
is available, and make_space
is true
, each file's capacity is reserved. Otherwise, the files will be initialized with 0 size.context | The SharedMemoryContext in which to store the opened FILE pointers. |
comm | context for communication |
u8 * hermes::InitSharedMemory | ( | const char * | shmem_name, |
size_t | total_size | ||
) |
Initialize shared memory.
SharedMemoryContext hermes::GetSharedMemoryContext | ( | char * | shmem_name | ) |
Retrieves information required for accessing the BufferPool shared memory.
Maps an existing shared memory segment into the calling process's address space. Application cores will call this function, and the Hermes core initialization will have already created the shared memory segment. Application cores can then use the context to access the BufferPool.
shmem_name | The name of the shared memory segment. |
void hermes::UnmapSharedMemory | ( | SharedMemoryContext * | context | ) |
Unmap shared memory.
void hermes::CloseBufferingFiles | ( | SharedMemoryContext * | context | ) |
Close buffering files.
void hermes::ReleaseSharedMemoryContext | ( | SharedMemoryContext * | context | ) |
Unmaps the shared memory represented by context and closes any open file descriptors
This isn't strictly necessary, since the segment will be unmapped when the process exits and the file descriptors will be closed, but is here for completeness.
context | The shared memory to unmap. |
size_t hermes::LocalWriteBufferById | ( | SharedMemoryContext * | context, |
BufferID | id, | ||
const Blob & | blob, | ||
size_t | offset | ||
) |
Write buffer by id buffer locally.
void hermes::WriteBlobToBuffers | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
const Blob & | blob, | ||
const std::vector< BufferID > & | buffer_ids | ||
) |
Sketch of how an I/O client might write.
Writes the blob to the collection of buffer_ids. The BufferIDs inform the call whether it is writing locally, remotely, to RAM (or a byte addressable Device) or to a file (block addressable Device).
context | The shared memory context needed to access BufferPool info |
rpc | The Hermes instance's RPC context |
blob | The data to write |
buffer_ids | The collection of BufferIDs that should buffer the blob |
size_t hermes::LocalReadBufferById | ( | SharedMemoryContext * | context, |
BufferID | id, | ||
Blob * | blob, | ||
size_t | read_offset | ||
) |
Read buffer by id buffer locally.
size_t hermes::ReadBlobFromBuffers | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
Blob * | blob, | ||
BufferIdArray * | buffer_ids, | ||
u32 * | buffer_sizes | ||
) |
Sketch of how an I/O client might read.
Reads the collection of buffer_ids into blob. The BufferIDs inform the call whether it is reading locally, remotely, from RAM (or a byte addressable Device) or to a file (block addressable Device).
context | The shared memory context needed to access BufferPool info. |
rpc | The RPC context needed to make a remote call if necessary. |
blob | A place to store the read data. |
buffer_ids | The collection of BufferIDs that hold the buffered blob. |
buffer_sizes | A list of sizes that correspond to each buffer in buffer_ids . Its length is the length of buffer_ids |
< KB
size_t hermes::ReadBlobById | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
Arena * | arena, | ||
Blob | blob, | ||
BlobID | blob_id | ||
) |
Read blob_id BLOB.
size_t hermes::ReadBlobById | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
Arena * | arena, | ||
api::Blob & | dest, | ||
BlobID | blob_id | ||
) |
Read a remote blob_id BLOB.
void hermes::OpenSwapFile | ( | SharedMemoryContext * | context, |
u32 | node_id | ||
) |
Open swap file.
SwapBlob hermes::WriteToSwap | ( | SharedMemoryContext * | context, |
Blob | blob, | ||
u32 | node_id, | ||
BucketID | bucket_id | ||
) |
Write blob data to a swap file.
SwapBlob hermes::PutToSwap | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
const std::string & | name, | ||
BucketID | bucket_id, | ||
const u8 * | data, | ||
size_t | size | ||
) |
Put data to a remote swap.
size_t hermes::ReadFromSwap | ( | SharedMemoryContext * | context, |
Blob | blob, | ||
SwapBlob | swap_blob | ||
) |
Read blob data from swap file.
api::Status hermes::PlaceBlob | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
PlacementSchema & | schema, | ||
Blob | blob, | ||
const std::string & | name, | ||
BucketID | bucket_id, | ||
const api::Context & | ctx, | ||
bool | called_from_buffer_organizer | ||
) |
Place blob BLOB.
< end timing
< begin timing
< end timing
api::Status hermes::StdIoPersistBucket | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
Arena * | arena, | ||
BucketID | bucket_id, | ||
const std::string & | file_name, | ||
const std::string & | open_mode | ||
) |
Persist Bucket using stdio.
api::Status hermes::StdIoPersistBlob | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
Arena * | arena, | ||
BlobID | blob_id, | ||
int | fd, | ||
const i32 & | offset | ||
) |
Persist BLOB using stdio.
f32 hermes::GetBlobImportanceScore | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
BlobID | blob_id | ||
) |
Get the importance score of blob_id BLOB.
void hermes::StartBufferPoolRpcServer | ( | SharedMemoryContext * | context, |
const char * | addr, | ||
i32 | num_rpc_threads | ||
) |
Starts an RPC server that will listen for remote requests directed to the BufferPool.
context | The shared memory context where the BufferPool lives |
addr | The address and port where the RPC server will listen This address must be a compatible with whatever the RPC implementation is. |
num_rpc_threads | number of RPC threads |
std::vector<SwapBlob> hermes::PutToSwap | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
BucketID | id, | ||
std::vector< std::vector< T >> & | blobs, | ||
std::vector< std::string > & | names | ||
) |
A template function to put BLOBs into swap
SwapBlob hermes::WriteToSwap | ( | SharedMemoryContext * | context, |
Blob | blob, | ||
BlobID | blob_id, | ||
BucketID | bucket_id | ||
) |
write BLOB to swap.
parse YAML configuration file
size_t hermes::InitCommunication | ( | CommunicationContext * | comm, |
Arena * | arena, | ||
size_t | trans_arena_size_per_node, | ||
bool | is_daemon, | ||
bool | is_adapter | ||
) |
initialize MPI communication.
|
inline |
world communicator
|
inline |
sub-communicator
void * hermes::GetAppCommunicator | ( | CommunicationContext * | comm | ) |
get the application's communicator
|
inline |
get the MPI process ID of comm MPI communicator.
|
inline |
get the MPI process ID of MPI world communicator from state MPIState.
|
inline |
get the MPI process ID of MPI sub-communicator from state MPIState.
|
inline |
get the number of MPI processes of comm MPI communicator.
|
inline |
get the number of MPI processes of MPI world communicator.
|
inline |
a wrapper for MPI_Barrier() fucntion
|
inline |
a wrapper for MPI global communicator's MPI_Barrier() function
|
inline |
a wrapper for MPI sub-communicator's MPI_Barrier() function
bool hermes::MpiFirstOnNode | ( | MPI_Comm | comm | ) |
Returns true if the calling rank is the lowest numbered rank on its node in communicator comm
.
size_t hermes::MpiAssignIDsToNodes | ( | CommunicationContext * | comm, |
size_t | trans_arena_size_per_node | ||
) |
Assigns each node an ID and returns the size in bytes of the transient arena for the calling rank.
void hermes::MpiFinalize | ( | void * | state | ) |
a wrapper for MPI_Finalize() function
void hermes::PrintExpectedAndFail | ( | const std::string & | expected, |
u32 | line_number = 0 |
||
) |
print expected value and fail when an error occurs
void hermes::RequireNumDevices | ( | Config * | config | ) |
log an error message when the number of devices is < 1 in config
void hermes::RequireNumSlabs | ( | Config * | config | ) |
log an error message when the number of any slab is < 1 in config
void hermes::RequireCapacitiesUnset | ( | bool & | already_specified | ) |
log an error message when capacities are specified multiple times
void hermes::RequireBlockSizesUnset | ( | bool & | already_specified | ) |
log an error message when block sizes are specified multiple times
void hermes::ParseCapacities | ( | Config * | config, |
YAML::Node | capacities, | ||
int | unit_conversion, | ||
bool & | already_specified | ||
) |
parse capacities from configuration file in YAML
void hermes::ParseBlockSizes | ( | Config * | config, |
YAML::Node | block_sizes, | ||
int | unit_conversion, | ||
bool & | already_specified | ||
) |
parse block sizes from configuration file in YAML
void hermes::ParseArray | ( | YAML::Node | list_node, |
const std::string | var, | ||
T * | list, | ||
int | max_list_len | ||
) |
parse var array from configuration file in YAML
void hermes::ParseVector | ( | YAML::Node | list_node, |
std::vector< T > & | list | ||
) |
parse list_node vector from configuration file in YAML
void hermes::ParseMatrix | ( | YAML::Node | matrix_node, |
const std::string | var, | ||
T * | matrix, | ||
int | max_row_len, | ||
int | max_col_len, | ||
int * | col_len | ||
) |
parse matrix_node matrix using col_len column length
void hermes::ParseMatrix | ( | YAML::Node | matrix_node, |
std::string | var, | ||
T * | matrix, | ||
int | max_row_len, | ||
int | max_col_len | ||
) |
parse matrix_node matrix from configuration file in YAML
void hermes::ParseRangeList | ( | YAML::Node | list_node, |
std::string | var, | ||
std::vector< std::string > & | list | ||
) |
parse range list from configuration file in YAML
void hermes::ParseHostNames | ( | YAML::Node | yaml_conf, |
hermes::Config * | config | ||
) |
parse host names from configuration file in YAML
void hermes::CheckConstraints | ( | Config * | config | ) |
check constraints in config configuration
void hermes::ParseConfigYAML | ( | YAML::Node & | yaml_conf, |
Config * | config | ||
) |
< KB
< MB
< GB
< KB
< MB
< GB
void hermes::ParseConfigString | ( | Arena * | arena, |
const std::string & | config_string, | ||
Config * | config | ||
) |
parse configuration string
void hermes::InitConfig | ( | hermes::Config * | config, |
const char * | config_file | ||
) |
< KB
hermes::Config* hermes::CreateConfig | ( | const char * | config_file | ) |
create configuration file
PlacementSchema hermes::AggregateBlobSchema | ( | PlacementSchema & | schema | ) |
aggregate BLOB schema
Status hermes::CalculatePlacement | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
const std::vector< size_t > & | blob_sizes, | ||
std::vector< PlacementSchema > & | output, | ||
const api::Context & | api_context | ||
) |
calculate data placement
bool hermes::IsPowerOfTwo | ( | size_t | val | ) |
Check if val number is a power of 2 or not. Use a bitwise operator instead of log_2(n) math function.
uintptr_t hermes::AlignForward | ( | uintptr_t | addr, |
size_t | alignment | ||
) |
align addr forward by alignment.
uintptr_t hermes::AlignBackward | ( | uintptr_t | addr, |
size_t | alignment | ||
) |
align addr backward by alignment.
initialize arena Arena with bytes capacity and base address
Initializes an Arena with a starting size and base pointer. The base
parameter must point to a contiguous region of allocated memory of at least bytes
bytes.
[in,out] | arena | The Arena to initialize. |
[in] | bytes | The desired size in bytes of the Arena's backing memory. |
[in] | base | A pointer to the beginning of the Arena's backing memory. |
Arena hermes::InitArenaAndAllocate | ( | size_t | bytes | ) |
initialize arena by allocating bytes memory
Initializes an Arena with a starting size. This function uses malloc to allocate a contiguous region of length bytes
for the arena.
[in] | bytes | The desired size in bytes to allocate. |
bytes
. void hermes::DestroyArena | ( | Arena * | arena | ) |
free arena Arena memory and reset its members to 0.
Frees the memory backing the Arena, and zeros out all its fields.
Only Arenas whose backing memory was created by malloc should be destroyed with this function. Arenas using shared memory as the backing store should not be destroyed. The backing memory is reclaimed when the shared memory is unlinked.
[in,out] | arena | The Arena to destroy. |
size_t hermes::GetRemainingCapacity | ( | Arena * | arena | ) |
void hermes::GrowArena | ( | Arena * | arena, |
size_t | new_size | ||
) |
The maximum capacity of arena
becomes new_size
.
Expands the backing memory for an arena to be new_size
bytes.
Becuase this function uses realloc
, it will only work for Arenas whose backing store was created with malloc. It cannot be used with Arenas whose backing store is shared memory (e.g., the BufferPool arena).
arena | The arena to expand. |
new_size | The new (larger) size that the Arena should occupy. |
TemporaryMemory hermes::BeginTemporaryMemory | ( | Arena * | arena | ) |
return a temporary memory that points to arena Arena
void hermes::EndTemporaryMemory | ( | TemporaryMemory * | temp_memory | ) |
copy temp_memory usage information back to its arena.
Returns a pointer to a raw region of size
bytes.
This is the lower level Arena allocation function. The higher level PushStruct and PushArray should be used by clients.
[in,out] | arena | The Arena to allocate from. |
[in] | size | The requested memory size in bytes. |
[in] | alignment | Align the result to a desired multiple. |
size
bytes. Returns a pointer to a raw region of bytes that are cleared to zero.
Like PushSize, but clears the requested region to zero.
[in,out] | arena | The Arena to allocate from. |
[in] | size | The requested memory size in bytes. |
[in] | alignment | Align the result to a desired multiple. |
size
zeros. get heap memory address
get heap free block pointer
get heap's next free block from block.
get pointer to heap's memory from offset.
get pointer to heap's memory from offset.
void hermes::HeapErrorHandler | ( | ) |
print a fatal out-of-memory error message.
compute heap's extent
return a pointer to heap's extent
initialize heap in arena with 4G capacity.
get the pointer to first free block from heap that has desired_size.
push size to heap
void hermes::HeapFree | ( | Heap * | heap, |
void * | ptr | ||
) |
free heap
void * hermes::HeapRealloc | ( | Heap * | heap, |
void * | ptr, | ||
size_t | size | ||
) |
reallocate heap
void hermes::CoalesceFreeBlocks | ( | Heap * | heap | ) |
coalesce free blocks from heap
Ticket hermes::TryBeginTicketMutex | ( | TicketMutex * | mutex, |
Ticket * | existing_ticket | ||
) |
acquire ticket from existing_ticket or new one from mutex
void hermes::BeginTicketMutex | ( | TicketMutex * | mutex | ) |
begin ticket mutex
void hermes::EndTicketMutex | ( | TicketMutex * | mutex | ) |
end ticket mutex
bool hermes::BeginReaderLock | ( | RwLock * | lock | ) |
begin reader lock by incrementing lock's readers.
void hermes::EndReaderLock | ( | RwLock * | lock | ) |
end reader lock
void hermes::BeginWriterLock | ( | RwLock * | lock | ) |
begin writer lock
void hermes::EndWriterLock | ( | RwLock * | lock | ) |
end writer lock
|
inline |
Reserves space for and returns a pointer to a T instance.
Note that the T instance will be uninitialized. The caller is responsible for any initialization.
[in,out] | arena | The backing Arena from which to reserve space. |
[in] | alignment | Align the result to a desired multiple. |
T
instance.
|
inline |
Reserves space for, clears to zero, and returns a pointer to a T instance.
Like PushStruct, but all the object's members are initialized to zero. Note: assumes 0/NULL is a valid value for all the object's members.
[in,out] | arena | The backing Arena from which to reserve space. |
[in] | alignment | Align the result to a desired multiple. |
T
instance with all members initialized to zero.
|
inline |
Reserves space for count
T
objects and returns a pointer to the first one.
The objects will be uninitialized.
[in,out] | arena | The backing Arena from which to reserve space. |
[in] | count | The number of objects to allocate. |
[in] | alignment | Align the result to a desired multiple. |
T
instance in the uninitialized array.
|
inline |
Reserves space for count
T
objects, clears them to zero, and returns a pointer to the first one.
[in,out] | arena | The backing Arena from which to reserve space. |
[in] | count | The number of objects to allocate. |
[in] | alignment | Align the result to a desired multiple. |
T
instance in the array.
|
inline |
A template for pushing structure to heap.
A template for pushing array of count size to heap.
"not equal" comparision operator
|
static |
is name too long for max?
bool hermes::IsBlobNameTooLong | ( | const std::string & | name | ) |
is BLOB's name too long for kMaxBlobNameSize?
bool hermes::IsBucketNameTooLong | ( | const std::string & | name | ) |
is Bucket's name too long for kMaxBucketNameSize?
bool hermes::IsVBucketNameTooLong | ( | const std::string & | name | ) |
is vBucket's name too long for kMaxVBucketNameSize?
|
inlinestatic |
is id null?
bool hermes::IsNullBucketId | ( | BucketID | id | ) |
is Bucket id null?
bool hermes::IsNullVBucketId | ( | VBucketID | id | ) |
is VBucket id null?
bool hermes::IsNullBlobId | ( | BlobID | id | ) |
is BLOB id null?
bool hermes::IsNullTargetId | ( | TargetID | id | ) |
is Target id null?
get the node ID of id BLOB
void hermes::LocalPut | ( | MetadataManager * | mdm, |
const char * | key, | ||
u64 | val, | ||
MapType | map_type | ||
) |
put key, value, and map_type locally
void hermes::LocalPut | ( | MetadataManager * | mdm, |
BlobID | key, | ||
const BlobInfo & | value | ||
) |
put key and value locally
u64 hermes::LocalGet | ( | MetadataManager * | mdm, |
const char * | key, | ||
MapType | map_type | ||
) |
get the value of key and map_type locally
void hermes::LocalDelete | ( | MetadataManager * | mdm, |
BlobID | key | ||
) |
delete key locally
void hermes::LocalDelete | ( | MetadataManager * | mdm, |
const char * | key, | ||
MapType | map_type | ||
) |
delete map_type locally
MetadataManager * hermes::GetMetadataManagerFromContext | ( | SharedMemoryContext * | context | ) |
get metadata manager from context shared memory context
|
static |
log error when metadata arena capacity is full
u32 hermes::HashString | ( | MetadataManager * | mdm, |
RpcContext * | rpc, | ||
const char * | str | ||
) |
get hash string for metadata storage
u64 hermes::GetId | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
const char * | name, | ||
MapType | map_type | ||
) |
get id
BucketID hermes::GetBucketId | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
const char * | name | ||
) |
get bucket id
BucketID hermes::LocalGetBucketId | ( | SharedMemoryContext * | context, |
const char * | name | ||
) |
get local bucket id
VBucketID hermes::GetVBucketId | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
const char * | name | ||
) |
get virtual bucket id
VBucketID hermes::LocalGetVBucketId | ( | SharedMemoryContext * | context, |
const char * | name | ||
) |
get local virtual bucket id
std::string hermes::MakeInternalBlobName | ( | const std::string & | name, |
BucketID | id | ||
) |
make an internal BLOB name
BlobID hermes::GetBlobId | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
const std::string & | name, | ||
BucketID | bucket_id, | ||
bool | track_stats | ||
) |
get BLOB id
void hermes::PutId | ( | MetadataManager * | mdm, |
RpcContext * | rpc, | ||
const std::string & | name, | ||
u64 | id, | ||
MapType | map_type | ||
) |
put BLOB id
void hermes::PutBucketId | ( | MetadataManager * | mdm, |
RpcContext * | rpc, | ||
const std::string & | name, | ||
BucketID | id | ||
) |
put bucket id
void hermes::LocalPutBucketId | ( | MetadataManager * | mdm, |
const std::string & | name, | ||
BucketID | id | ||
) |
put bucket id locally
void hermes::PutVBucketId | ( | MetadataManager * | mdm, |
RpcContext * | rpc, | ||
const std::string & | name, | ||
VBucketID | id | ||
) |
put virtual bucket id
void hermes::LocalPutVBucketId | ( | MetadataManager * | mdm, |
const std::string & | name, | ||
VBucketID | id | ||
) |
put virtual bucket id locally
void hermes::PutBlobId | ( | MetadataManager * | mdm, |
RpcContext * | rpc, | ||
const std::string & | name, | ||
BlobID | id, | ||
BucketID | bucket_id | ||
) |
put BLOB id
void hermes::DeleteId | ( | MetadataManager * | mdm, |
RpcContext * | rpc, | ||
const std::string & | name, | ||
MapType | map_type | ||
) |
delete id
void hermes::DeleteBucketId | ( | MetadataManager * | mdm, |
RpcContext * | rpc, | ||
const std::string & | name | ||
) |
delete bucket id
void hermes::DeleteVBucketId | ( | MetadataManager * | mdm, |
RpcContext * | rpc, | ||
const std::string & | name | ||
) |
delete virtual bucket id
void hermes::LocalDeleteBlobInfo | ( | MetadataManager * | mdm, |
BlobID | blob_id | ||
) |
delete BLOB information locally
void hermes::LocalDeleteBlobId | ( | MetadataManager * | mdm, |
const std::string & | name, | ||
BucketID | bucket_id | ||
) |
delete BLOB id locally
void hermes::DeleteBlobId | ( | MetadataManager * | mdm, |
RpcContext * | rpc, | ||
const std::string & | name, | ||
BucketID | bucket_id | ||
) |
delete BLOB id
BucketInfo * hermes::LocalGetBucketInfoByIndex | ( | MetadataManager * | mdm, |
u32 | index | ||
) |
get bucket information by index index locally
std::string hermes::LocalGetBlobNameFromId | ( | SharedMemoryContext * | context, |
BlobID | blob_id | ||
) |
get BLOB name from blob_id locally
std::string hermes::GetBlobNameFromId | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
BlobID | blob_id | ||
) |
get BLOB name from blob_id
u64 hermes::HexStringToU64 | ( | const std::string & | s | ) |
Faster version of std::stoull.
This is 4.1x faster than std::stoull. Since we generate all the numbers that we use this function on, we can guarantee the following:
Avoiding all this input sanitization and error checking is how we can get a 4.1x speedup.
s | A string with size at least kBucketIdStringSize, where the first kBucketIdStringSize characters consist only of 0-9 and a-f. |
s
. BucketID hermes::LocalGetBucketIdFromBlobId | ( | SharedMemoryContext * | context, |
BlobID | id | ||
) |
get bucket ID from blob_id locally
BucketID hermes::GetBucketIdFromBlobId | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
BlobID | id | ||
) |
get bucket ID from blob_id
BucketInfo* hermes::LocalGetBucketInfoById | ( | MetadataManager * | mdm, |
BucketID | id | ||
) |
get bucket information from bucket_id
std::vector< BlobID > hermes::GetBlobIds | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
BucketID | bucket_id | ||
) |
get BLOB IDs from bucket_id
VBucketInfo * hermes::GetVBucketInfoByIndex | ( | MetadataManager * | mdm, |
u32 | index | ||
) |
get virtual bucket information by index
BucketID hermes::LocalGetNextFreeBucketId | ( | SharedMemoryContext * | context, |
const std::string & | name | ||
) |
Returns an available BucketID and marks it as in use in the MDM.
Assumes MetadataManager::bucket_mutex is already held by the caller.
BucketID hermes::LocalGetOrCreateBucketId | ( | SharedMemoryContext * | context, |
const std::string & | name | ||
) |
get or create a bucket ID locally
BucketID hermes::GetOrCreateBucketId | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
const std::string & | name | ||
) |
get or create a bucket ID
VBucketID hermes::LocalGetNextFreeVBucketId | ( | SharedMemoryContext * | context, |
const std::string & | name | ||
) |
Returns an available VBucketID and marks it as in use in the MDM.
Assumes MetadataManager::vbucket_mutex is already held by the caller.
VBucketID hermes::LocalGetOrCreateVBucketId | ( | SharedMemoryContext * | context, |
const std::string & | name | ||
) |
get or create a virtual bucket ID locally
VBucketID hermes::GetOrCreateVBucketId | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
const std::string & | name | ||
) |
get or create a virtual bucket ID
copy IDs
void hermes::ReplaceBlobIdInBucket | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
BucketID | bucket_id, | ||
BlobID | old_blob_id, | ||
BlobID | new_blob_id | ||
) |
Deletes old_blob_id
from bucket_id
and adds new_blob_id
. It combines the delete and the add into one call in order to avoid multiple RPCs.
void hermes::AddBlobIdToBucket | ( | MetadataManager * | mdm, |
RpcContext * | rpc, | ||
BlobID | blob_id, | ||
BucketID | bucket_id | ||
) |
add BLOB ID to bucket
void hermes::AddBlobIdToVBucket | ( | MetadataManager * | mdm, |
RpcContext * | rpc, | ||
BlobID | blob_id, | ||
VBucketID | vbucket_id | ||
) |
add BLOB ID to virtual bucket
u32 hermes::AllocateBufferIdList | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
u32 | target_node, | ||
const std::vector< BufferID > & | buffer_ids | ||
) |
allocate buffer ID list
bool hermes::BlobIsInSwap | ( | BlobID | id | ) |
is BLOB in swap?
void hermes::GetBufferIdList | ( | Arena * | arena, |
SharedMemoryContext * | context, | ||
RpcContext * | rpc, | ||
BlobID | blob_id, | ||
BufferIdArray * | buffer_ids | ||
) |
get buffer ID list
std::vector< BufferID > hermes::GetBufferIdList | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
BlobID | blob_id | ||
) |
get buffer ID list as vector
BufferIdArray hermes::GetBufferIdsFromBlobId | ( | Arena * | arena, |
SharedMemoryContext * | context, | ||
RpcContext * | rpc, | ||
BlobID | blob_id, | ||
u32 ** | sizes | ||
) |
get buffer IDs from BLOB id
void hermes::LocalCreateBlobMetadata | ( | SharedMemoryContext * | context, |
MetadataManager * | mdm, | ||
const std::string & | blob_name, | ||
BlobID | blob_id, | ||
TargetID | effective_target | ||
) |
create BLOB metadata locally
void hermes::CreateBlobMetadata | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
const std::string & | blob_name, | ||
BlobID | blob_id, | ||
TargetID | effective_target | ||
) |
create BLOB metadata
void hermes::AttachBlobToBucket | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
const char * | blob_name, | ||
BucketID | bucket_id, | ||
const std::vector< BufferID > & | buffer_ids, | ||
TargetID | effective_target, | ||
bool | is_swap_blob, | ||
bool | called_from_buffer_organizer | ||
) |
attach BLOB to bucket
void hermes::FreeBufferIdList | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
BlobID | blob_id | ||
) |
free buffer ID list
void hermes::LocalDeleteBlobMetadata | ( | MetadataManager * | mdm, |
const char * | blob_name, | ||
BlobID | blob_id, | ||
BucketID | bucket_id | ||
) |
delete BLOB metadata locally
void hermes::WaitForOutstandingBlobOps | ( | MetadataManager * | mdm, |
BlobID | blob_id | ||
) |
wait for outstanding BLOB operations
void hermes::LocalDestroyBlobByName | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
const char * | blob_name, | ||
BlobID | blob_id, | ||
BucketID | bucket_id | ||
) |
destroy BLOB by name locally
void hermes::LocalDestroyBlobById | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
BlobID | blob_id, | ||
BucketID | bucket_id | ||
) |
destroy BLOB by ID locally
void hermes::RemoveBlobFromBucketInfo | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
BucketID | bucket_id, | ||
BlobID | blob_id | ||
) |
remove BLOB from Bucket
void hermes::DestroyBlobByName | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
BucketID | bucket_id, | ||
const std::string & | blob_name | ||
) |
destroy BLOB by name
void hermes::RenameBlob | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
const std::string & | old_name, | ||
const std::string & | new_name, | ||
BucketID | bucket_id | ||
) |
rename BLOB
bool hermes::ContainsBlob | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
BucketID | bucket_id, | ||
const std::string & | blob_name | ||
) |
does bucket_id bucket contain blob_name BLOB?
void hermes::DestroyBlobById | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
BlobID | id, | ||
BucketID | bucket_id | ||
) |
destroy BLOB by ID
bool hermes::DestroyBucket | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
const char * | name, | ||
BucketID | bucket_id | ||
) |
destroy bucket
bool hermes::DestroyVBucket | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
const char * | name, | ||
VBucketID | vbucket_id | ||
) |
destroy virtual bucket
void hermes::LocalRenameBucket | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
BucketID | id, | ||
const std::string & | old_name, | ||
const std::string & | new_name | ||
) |
rename bucket locally
void hermes::RenameBucket | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
BucketID | id, | ||
const std::string & | old_name, | ||
const std::string & | new_name | ||
) |
rename bucket
void hermes::LocalIncrementRefcount | ( | SharedMemoryContext * | context, |
BucketID | id | ||
) |
increment reference count locally
void hermes::LocalDecrementRefcount | ( | SharedMemoryContext * | context, |
BucketID | id | ||
) |
decrement reference count locally
void hermes::DecrementRefcount | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
BucketID | id | ||
) |
decrement reference count
u64 hermes::LocalGetRemainingTargetCapacity | ( | SharedMemoryContext * | context, |
TargetID | id | ||
) |
get remaning target capacity locally
SystemViewState* hermes::GetLocalSystemViewState | ( | MetadataManager * | mdm | ) |
get local system view state from mdm metadata mamanger
SystemViewState * hermes::GetLocalSystemViewState | ( | SharedMemoryContext * | context | ) |
get local system view state from context
get local system view state
std::vector< u64 > hermes::LocalGetGlobalDeviceCapacities | ( | SharedMemoryContext * | context | ) |
get global device capacities locally
std::vector< u64 > hermes::GetGlobalDeviceCapacities | ( | SharedMemoryContext * | context, |
RpcContext * | rpc | ||
) |
get global device capacities
GlobalSystemViewState * hermes::GetGlobalSystemViewState | ( | SharedMemoryContext * | context | ) |
get global system view state from context
std::vector< ViolationInfo > hermes::LocalUpdateGlobalSystemViewState | ( | SharedMemoryContext * | context, |
u32 | node_id, | ||
std::vector< i64 > | adjustments | ||
) |
update global system view state locally
void hermes::UpdateGlobalSystemViewState | ( | SharedMemoryContext * | context, |
RpcContext * | rpc | ||
) |
update global system view state
TargetID hermes::FindTargetIdFromDeviceId | ( | const std::vector< TargetID > & | targets, |
DeviceID | device_id | ||
) |
find target ID from device ID
|
static |
get offset from metadata manager
SystemViewState* hermes::CreateSystemViewState | ( | Arena * | arena, |
Config * | config | ||
) |
create system view state
GlobalSystemViewState* hermes::CreateGlobalSystemViewState | ( | RpcContext * | rpc, |
Arena * | arena, | ||
Config * | config | ||
) |
create global system view state
std::string hermes::GetSwapFilename | ( | MetadataManager * | mdm, |
u32 | node_id | ||
) |
get swap file name
swap BLOB to vector
SwapBlob hermes::IdArrayToSwapBlob | ( | BufferIdArray | ids | ) |
ID array to swap BLOB
void hermes::InitMetadataManager | ( | MetadataManager * | mdm, |
RpcContext * | rpc, | ||
Arena * | arena, | ||
Config * | config | ||
) |
initialize metadata manager
VBucketInfo* hermes::LocalGetVBucketInfoByIndex | ( | MetadataManager * | mdm, |
u32 | index | ||
) |
get virtual bucket information by index locally
VBucketInfo* hermes::LocalGetVBucketInfoById | ( | MetadataManager * | mdm, |
VBucketID | id | ||
) |
get virtual bucket information by id locally
void hermes::LocalIncrementRefcount | ( | SharedMemoryContext * | context, |
VBucketID | id | ||
) |
increment reference counter locally
void hermes::LocalDecrementRefcount | ( | SharedMemoryContext * | context, |
VBucketID | id | ||
) |
decrement reference counter locally
void hermes::DecrementRefcount | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
VBucketID | id | ||
) |
decrement reference counter
u32 hermes::GetRelativeNodeId | ( | RpcContext * | rpc, |
int | offset | ||
) |
get relative node ID
u32 hermes::GetNextNode | ( | RpcContext * | rpc | ) |
get next node
u32 hermes::GetPreviousNode | ( | RpcContext * | rpc | ) |
get previous node
std::vector<TargetID> hermes::GetNodeTargets | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
u32 | target_node | ||
) |
get node targets
std::vector< TargetID > hermes::GetNeighborhoodTargets | ( | SharedMemoryContext * | context, |
RpcContext * | rpc | ||
) |
get neighborhood node targets
u64 hermes::GetRemainingTargetCapacity | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
TargetID | target_id | ||
) |
get remaining target capacity
std::vector< u64 > hermes::GetRemainingTargetCapacities | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
const std::vector< TargetID > & | targets | ||
) |
get remaining target capacities
void hermes::AttachBlobToVBucket | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
const char * | blob_name, | ||
const char * | bucket_name, | ||
VBucketID | vbucket_id | ||
) |
attach BLOB to VBucket
std::string hermes::LocalGetBucketNameById | ( | SharedMemoryContext * | context, |
BucketID | blob_id | ||
) |
get bucket name by ID locally
std::vector< BlobID > hermes::GetBlobsFromVBucketInfo | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
VBucketID | vbucket_id | ||
) |
get BLOB from VBucket
void hermes::RemoveBlobFromVBucketInfo | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
VBucketID | vbucket_id, | ||
const char * | blob_name, | ||
const char * | bucket_name | ||
) |
remove BLOB from VBucket
std::string hermes::GetBucketNameById | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
BucketID | id | ||
) |
get bucket name by bucket ID
f32 hermes::ScoringFunction | ( | MetadataManager * | mdm, |
Stats * | stats | ||
) |
Returns the score calculated from stats
.
A high score indicates a "cold" Blob, or one that has not been accessed very recently or frequently.
int hermes::LocalGetNumOutstandingFlushingTasks | ( | SharedMemoryContext * | context, |
VBucketID | id | ||
) |
get number of outstanding flushing tasks locally
int hermes::GetNumOutstandingFlushingTasks | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
VBucketID | id | ||
) |
get number of outstanding flushing tasks
bool hermes::LocalLockBlob | ( | SharedMemoryContext * | context, |
BlobID | blob_id | ||
) |
lock BLOB locally
bool hermes::LocalUnlockBlob | ( | SharedMemoryContext * | context, |
BlobID | blob_id | ||
) |
unlock BLOB locally
bool hermes::LockBlob | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
BlobID | blob_id | ||
) |
lock BLOB
bool hermes::UnlockBlob | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
BlobID | blob_id | ||
) |
unlock BLOB
void hermes::MakeShmemString | ( | ShmemString * | sms, |
u8 * | memory, | ||
const char * | val, | ||
u32 | size | ||
) |
make shared memory string
void hermes::MakeShmemString | ( | ShmemString * | sms, |
u8 * | memory, | ||
const std::string & | val | ||
) |
Creates a ShmemString with the value val
at location memory
.
sms
must be lower than memory
because the offset
is from the beginning of the sms.[out] | sms | The ShmemString instance to be filled out. |
memory | The location in shared memory to store the val . | |
val | The string to store. |
std::string hermes::GetShmemString | ( | ShmemString * | sms | ) |
Retrieves a ShmemString into a std::string
sms | The ShmemString that represents the internal string |
void hermes::InitNeighborhoodTargets | ( | SharedMemoryContext * | context, |
RpcContext * | rpc | ||
) |
initialize neighborhood targets
void hermes::BeginGlobalTicketMutex | ( | SharedMemoryContext * | context, |
RpcContext * | rpc | ||
) |
begin global ticket mutex
void hermes::EndGlobalTicketMutex | ( | SharedMemoryContext * | context, |
RpcContext * | rpc | ||
) |
end global ticket mutex
void hermes::LocalBeginGlobalTicketMutex | ( | MetadataManager * | mdm | ) |
begin global ticket mutex locally
void hermes::LocalEndGlobalTicketMutex | ( | MetadataManager * | mdm | ) |
end global ticket mutex locally
void hermes::IncrementBlobStats | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
BlobID | blob_id | ||
) |
increment BLOB stats
void hermes::LocalIncrementBlobStats | ( | MetadataManager * | mdm, |
BlobID | blob_id | ||
) |
increment BLOB stats locally
void hermes::LocalReplaceBlobIdInBucket | ( | SharedMemoryContext * | context, |
BucketID | bucket_id, | ||
BlobID | old_blob_id, | ||
BlobID | new_blob_id | ||
) |
replace BLOB ID in bucket locally
TicketMutex * hermes::GetMapMutex | ( | MetadataManager * | mdm, |
MapType | map_type | ||
) |
get ticket mutex based on map_type
void hermes::LocalAddBlobIdToBucket | ( | MetadataManager * | mdm, |
BucketID | bucket_id, | ||
BlobID | blob_id, | ||
bool | track_stats | ||
) |
add BLOB ID to bucket locally
void hermes::LocalAddBlobIdToVBucket | ( | MetadataManager * | mdm, |
VBucketID | vbucket_id, | ||
BlobID | blob_id | ||
) |
add BLOB ID to virtual bucket locally
std::vector< BufferID > hermes::LocalGetBufferIdList | ( | MetadataManager * | mdm, |
BlobID | blob_id | ||
) |
get buffer ID list locally
void hermes::LocalGetBufferIdList | ( | Arena * | arena, |
MetadataManager * | mdm, | ||
BlobID | blob_id, | ||
BufferIdArray * | buffer_ids | ||
) |
get buffer ID list into buffer_ids locally
void hermes::LocalFreeBufferIdList | ( | SharedMemoryContext * | context, |
BlobID | blob_id | ||
) |
free buffer ID list locally
bool hermes::LocalDestroyBucket | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
const char * | bucket_name, | ||
BucketID | bucket_id | ||
) |
destroy bucket locally
bool hermes::LocalDestroyVBucket | ( | SharedMemoryContext * | context, |
const char * | vbucket_name, | ||
VBucketID | vbucket_id | ||
) |
destroy virtual bucket locally
u32 hermes::LocalAllocateBufferIdList | ( | MetadataManager * | mdm, |
const std::vector< BufferID > & | buffer_ids | ||
) |
allocate buffer ID list locally
bool hermes::LocalContainsBlob | ( | SharedMemoryContext * | context, |
BucketID | bucket_id, | ||
BlobID | blob_id | ||
) |
does bucket_id contain blob_id BLOB locally?
void hermes::LocalRemoveBlobFromBucketInfo | ( | SharedMemoryContext * | context, |
BucketID | bucket_id, | ||
BlobID | blob_id | ||
) |
remove BLOB from bucket locally
void hermes::StartGlobalSystemViewStateUpdateThread | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
Arena * | arena, | ||
double | sleep_ms | ||
) |
start global system view state update thread
void hermes::InitMetadataStorage | ( | SharedMemoryContext * | context, |
MetadataManager * | mdm, | ||
Arena * | arena, | ||
Config * | config | ||
) |
initialize metadata storage
std::vector< BlobID > hermes::LocalGetBlobIds | ( | SharedMemoryContext * | context, |
BucketID | bucket_id | ||
) |
get BLOB IDs locally
std::vector< TargetID > hermes::LocalGetNodeTargets | ( | SharedMemoryContext * | context | ) |
get node targets locally
f32 hermes::LocalGetBlobImportanceScore | ( | SharedMemoryContext * | context, |
BlobID | blob_id | ||
) |
get BLOB's importance score locally
void hermes::LocalRemoveBlobFromVBucketInfo | ( | SharedMemoryContext * | context, |
VBucketID | vbucket_id, | ||
BlobID | blob_id | ||
) |
remove BLOB from virtual bucket locally
std::vector< BlobID > hermes::LocalGetBlobsFromVBucketInfo | ( | SharedMemoryContext * | context, |
VBucketID | vbucket_id | ||
) |
get BLOBs from virtual bucket information locally
Heap * hermes::GetIdHeap | ( | MetadataManager * | mdm | ) |
get ID heap
Heap * hermes::GetMapHeap | ( | MetadataManager * | mdm | ) |
get map heap
IdList hermes::AllocateIdList | ( | MetadataManager * | mdm, |
u32 | length | ||
) |
allocate ID list
void hermes::FreeIdList | ( | MetadataManager * | mdm, |
IdList | id_list | ||
) |
free id_list ID list
u32 hermes::AppendToChunkedIdList | ( | MetadataManager * | mdm, |
ChunkedIdList * | id_list, | ||
u64 | id | ||
) |
Assumes the caller has protected id_list
with a lock.
id
. void hermes::PutToStorage | ( | MetadataManager * | mdm, |
const char * | key, | ||
u64 | val, | ||
MapType | map_type | ||
) |
put map_type to storage
void hermes::PutToStorage | ( | MetadataManager * | mdm, |
BlobID | key, | ||
const BlobInfo & | val | ||
) |
put to storage
u64 hermes::GetFromStorage | ( | MetadataManager * | mdm, |
const char * | key, | ||
MapType | map_type | ||
) |
get from storage
std::string hermes::ReverseGetFromStorage | ( | MetadataManager * | mdm, |
u64 | id, | ||
MapType | map_type | ||
) |
reverse the get from storage operation
void hermes::DeleteFromStorage | ( | MetadataManager * | mdm, |
BlobID | key, | ||
bool | lock | ||
) |
delete from storage
void hermes::DeleteFromStorage | ( | MetadataManager * | mdm, |
const char * | key, | ||
MapType | map_type | ||
) |
delete map_type from storage
u32 hermes::HashStringForStorage | ( | MetadataManager * | mdm, |
RpcContext * | rpc, | ||
const char * | str | ||
) |
generate hash string for storage
void hermes::SeedHashForStorage | ( | size_t | seed | ) |
seed hash for storage
size_t hermes::GetStoredMapSize | ( | MetadataManager * | mdm, |
MapType | map_type | ||
) |
get the size of stored map
std::vector< TargetID > hermes::LocalGetNeighborhoodTargets | ( | SharedMemoryContext * | context | ) |
get neighborhood targets locally
BlobInfo * hermes::GetBlobInfoPtr | ( | MetadataManager * | mdm, |
BlobID | blob_id | ||
) |
Takes a lock on mdm->blob_info_map_mutex. Requires a corresponding ReleaseBlobInfoPtr call.
void hermes::ReleaseBlobInfoPtr | ( | MetadataManager * | mdm | ) |
release pointer to BLOB information
u64 * hermes::GetIdsPtr | ( | MetadataManager * | mdm, |
IdList | id_list | ||
) |
Return a pointer to the internal array of IDs that the id_list
represents.
This call acquires a lock, and must be paired with a corresponding call to ReleaseIdsPtr
to release the lock.
u64 * hermes::GetIdsPtr | ( | MetadataManager * | mdm, |
ChunkedIdList | id_list | ||
) |
get pointer to the internal array of IDs that the chucked id_list represents
void hermes::ReleaseIdsPtr | ( | MetadataManager * | mdm | ) |
release IDs pointer
std::vector< u64 > hermes::GetChunkedIdList | ( | MetadataManager * | mdm, |
ChunkedIdList | id_list | ||
) |
Assumes the caller has protected id_list
with a lock.
|
static |
get map by offset
|
static |
get bucket map
|
static |
get virtual bucket map
|
static |
get BLOB ID map
void hermes::CheckHeapOverlap | ( | MetadataManager * | mdm | ) |
check if heap overlaps
IdMap* hermes::GetMap | ( | MetadataManager * | mdm, |
MapType | map_type | ||
) |
BlobInfoMap* hermes::GetBlobInfoMapNoLock | ( | MetadataManager * | mdm | ) |
get BLOB information map without mutex locking
BlobInfoMap* hermes::GetBlobInfoMap | ( | MetadataManager * | mdm | ) |
get BLOB information map
void hermes::ReleaseMap | ( | MetadataManager * | mdm, |
MapType | map_type | ||
) |
Releases the lock acquired by GetMap
.
Stats hermes::LocalGetBlobStats | ( | SharedMemoryContext * | context, |
BlobID | blob_id | ||
) |
get BLOB stats locally
IdList hermes::GetEmbeddedIdList | ( | MetadataManager * | mdm, |
u32 | offset | ||
) |
Returns a copy of an embedded IdList
.
An IdList
that consists of BufferID
s contains an embedded IdList
as the first element of the list. This is so the BlobID
can find information about its buffers from a single offset. If you want a pointer to the BufferID
s in an IdList
, then you have to first retrieve the embedded IdList
using this function, and then use the resulting IdList
in GetIdsPtr
.
BufferID* hermes::GetBufferIdsPtrFromBlobId | ( | MetadataManager * | mdm, |
BlobID | blob_id, | ||
size_t & | length | ||
) |
Return a pointer to the internal array of BufferID
s associated with the blob_id
.
Acquires a lock, and must be paired with a call to ReleaseIdsPtr
to release the lock. The length of the array is returned in the length
parameter.
|
static |
Convert a key offset into the pointer where the string is stored.
Even though our maps are char* -> u64, the keys are not actually pointers to strings, but rather offsets into the shared memory Heap where the strings are stored. This function converts the key at index
from an offset to a char*. This produces the equivalent of: char *result = map[index].key;
void hermes::FreeIdList | ( | MetadataManager * | mdm, |
T | id_list | ||
) |
free ID list
void hermes::FreeEmbeddedIdList | ( | MetadataManager * | mdm, |
u32 | offset | ||
) |
free embedded ID list
void hermes::AllocateOrGrowIdList | ( | MetadataManager * | mdm, |
ChunkedIdList * | id_list | ||
) |
Assumes the caller has protected id_list
with a lock.
u64 hermes::GetChunkedIdListElement | ( | MetadataManager * | mdm, |
ChunkedIdList * | id_list, | ||
u32 | index | ||
) |
get chuncked ID list element
void hermes::SetChunkedIdListElement | ( | MetadataManager * | mdm, |
ChunkedIdList * | id_list, | ||
u32 | index, | ||
u64 | value | ||
) |
set chuncked ID list element
i64 hermes::GetIndexOfId | ( | MetadataManager * | mdm, |
ChunkedIdList * | id_list, | ||
u64 | id | ||
) |
get index of ID
u32 hermes::AllocateEmbeddedIdList | ( | MetadataManager * | mdm, |
u32 | length | ||
) |
allocate embedded ID list
|
inlinestatic |
is list's capacity greater than 0?
|
inlinestatic |
Has virtual bucket info allocated BLOBS?
|
inlinestatic |
Has bucket info allocated BLOBS?
std::vector<TargetID> hermes::LocalGetTargets | ( | SharedMemoryContext * | context, |
IdList | target_list | ||
) |
get targets locally
void hermes::InitSwapSpaceFilename | ( | MetadataManager * | mdm, |
Arena * | arena, | ||
Config * | config | ||
) |
initialize swap space file name
void hermes::InitRpcContext | ( | RpcContext * | rpc, |
u32 | num_nodes, | ||
u32 | node_id, | ||
Config * | config | ||
) |
initialize RPC context
void * hermes::CreateRpcState | ( | Arena * | arena | ) |
create RPC state
void hermes::InitRpcClients | ( | RpcContext * | rpc | ) |
initialize RPC clients
void hermes::ShutdownRpcClients | ( | RpcContext * | rpc | ) |
shut down RPC clients
void hermes::RunDaemon | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
CommunicationContext * | comm, | ||
Arena * | trans_arena, | ||
const char * | shmem_name | ||
) |
run daemon
void hermes::FinalizeClient | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
CommunicationContext * | comm, | ||
Arena * | trans_arena, | ||
bool | stop_daemon | ||
) |
finalize client
void hermes::FinalizeRpcContext | ( | RpcContext * | rpc, |
bool | is_daemon | ||
) |
finalize RPC context
std::string hermes::GetServerName | ( | RpcContext * | rpc, |
u32 | node_id, | ||
bool | is_buffer_organizer | ||
) |
get server name
std::string hermes::GetProtocol | ( | RpcContext * | rpc | ) |
get protocol
void hermes::StartBufferOrganizer | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
Arena * | arena, | ||
const char * | addr, | ||
int | num_threads, | ||
int | port | ||
) |
start buffer organizer
void hermes::CopyStringToCharArray | ( | const std::string & | src, |
char * | dest, | ||
size_t | max | ||
) |
copy string to character array
void hermes::ThalliumStartRpcServer | ( | SharedMemoryContext * | context, |
RpcContext * | rpc, | ||
Arena * | arena, | ||
const char * | addr, | ||
i32 | num_rpc_threads | ||
) |
start Thallium RPC server
void hermes::StopGlobalSystemViewStateUpdateThread | ( | RpcContext * | rpc | ) |
stop global system view state update thread
std::string hermes::GetHostNameFromNodeId | ( | RpcContext * | rpc, |
u32 | node_id | ||
) |
get host name from node ID
std::string hermes::GetRpcAddress | ( | RpcContext * | rpc, |
Config * | config, | ||
u32 | node_id, | ||
int | port | ||
) |
get RPC address
size_t hermes::BulkRead | ( | RpcContext * | rpc, |
u32 | node_id, | ||
const char * | func_name, | ||
u8 * | data, | ||
size_t | max_size, | ||
BufferID | id | ||
) |
read bulk
void hermes::serialize | ( | A & | ar, |
BufferID & | buffer_id | ||
) |
void hermes::serialize | ( | A & | ar, |
BucketID & | bucket_id | ||
) |
void hermes::serialize | ( | A & | ar, |
VBucketID & | vbucket_id | ||
) |
void hermes::serialize | ( | A & | ar, |
BlobID & | blob_id | ||
) |
void hermes::serialize | ( | A & | ar, |
TargetID & | target_id | ||
) |
void hermes::serialize | ( | A & | ar, |
SwapBlob & | swap_blob | ||
) |
serialize swap_blob
void hermes::serialize | ( | A & | ar, |
BufferInfo & | info | ||
) |
serialize info
void hermes::save | ( | A & | ar, |
MapType & | map_type | ||
) |
Lets Thallium know how to serialize a MapType.
This function is called implicitly by Thallium.
ar | An archive provided by Thallium. |
map_type | The MapType to serialize. |
void hermes::load | ( | A & | ar, |
MapType & | map_type | ||
) |
Lets Thallium know how to serialize a MapType.
This function is called implicitly by Thallium.
ar | An archive provided by Thallium. |
map_type | The MapType to serialize. |
void hermes::save | ( | A & | ar, |
BoPriority & | priority | ||
) |
save priority
void hermes::load | ( | A & | ar, |
BoPriority & | priority | ||
) |
load priority
void hermes::save | ( | A & | ar, |
ThresholdViolation & | violation | ||
) |
save violation
void hermes::load | ( | A & | ar, |
ThresholdViolation & | violation | ||
) |
load violation
void hermes::save | ( | A & | ar, |
BoOperation & | op | ||
) |
save buffer organizer op
void hermes::load | ( | A & | ar, |
BoOperation & | op | ||
) |
load buffer organizer op
void hermes::serialize | ( | A & | ar, |
BoArgs & | bo_args | ||
) |
serialize buffer organizer arguments
void hermes::serialize | ( | A & | ar, |
BoTask & | bo_task | ||
) |
serialize buffer organizer task
void hermes::serialize | ( | A & | ar, |
ViolationInfo & | info | ||
) |
serialize violation information
|
inlinestatic |
get Thallium state
|
inlinestatic |
get Thallium client state
|
static |
is func_name buffer organizer function?
ReturnType hermes::RpcCall | ( | RpcContext * | rpc, |
u32 | node_id, | ||
const char * | func_name, | ||
Ts... | args | ||
) |
RPC call
size_t hermes::RoundUpToMultiple | ( | size_t | val, |
size_t | multiple | ||
) |
Rounds a value up to the next given multiple.
Returns the original value if it is already divisible by multiple.
Example:
val | The initial value to round. |
multiple | The multiple to round up to. |
size_t hermes::RoundDownToMultiple | ( | size_t | val, |
size_t | multiple | ||
) |
Rounds a value down to the previous given multiple.
Returns the original value if it is already divisible by multiple.
Example:
val | The initial value to round. |
multiple | The multiple to round down to. |
void hermes::InitDefaultConfig | ( | Config * | config | ) |
void hermes::FailedLibraryCall | ( | std::string | func | ) |
print an error message for func function that failed
const int hermes::kGlobalDebugMaxAllocations = KILOBYTES(64) |
global debug maxium allocations
DebugState* hermes::global_debug_id_state |
global debug id state
DebugState* hermes::global_debug_map_state |
global debug map state
char hermes::global_debug_map_name[] = "/hermes_debug_map_heap" |
name for global debug map heap
char hermes::global_debug_id_name[] = "/hermes_debug_id_heap" |
name for global debug id heap
const size_t hermes::kDefaultCoeffs = 1000 + 1 |
GLPK documentation: http://most.ccib.rutgers.edu/glpk.pdf
|
staticconstexpr |
max. buffer pool slabs
|
constexpr |
max. path length
|
constexpr |
max. buffer pool shared memory name length
|
constexpr |
max. devices
|
constexpr |
max. bucket name size
|
constexpr |
max. virtual bucket name size
|
constexpr |
a string to represent the place in hierarchy
const TargetID hermes::kSwapTargetId = {{0, 0, 0}} |
A constant for swap target IDs
|
constexpr |
A constant for bucket id string size
|
constexpr |
The maximum size in bytes allowed for Blob names.
const int hermes::kAttemptsBeforeYield = 100 |
A constant value for maximum attempts for ticket lock
|
static |
|
static |
global mutex node ID
const int hermes::kIdListChunkSize = 10 |
chunk size of ID list
|
staticconstexpr |
maxinum number of traits per bucket
const int hermes::kMaxServerNameSize = 128 |
maximum size of server name
const int hermes::kMaxServerSuffixSize = 16 |
maximum size of server suffix
const int hermes::kMaxServerNamePrefix = 32 |
max. server name prefix
const int hermes::kMaxServerNamePostfix = 8 |
max. server name suffix
const char hermes::kBoPrefix[] = "BO::" |
buffer organizer prefix
const int hermes::kBoPrefixLength = sizeof(kBoPrefix) - 1 |
buffer organizer prefix length