SIONlib
1.7.7
Scalable I/O library for parallel access to task-local files
|
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <assert.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include "sion.h"
#include "sion_debug.h"
#include "sion_error_handler.h"
#include "sion_internal.h"
#include "sion_cache.h"
Go to the source code of this file.
Macros | |
#define | _XOPEN_SOURCE 700 |
Functions | |
int | _sion_cache_check_env (_sion_filedesc *sion_filedesc) |
Check if environment variables are set to use cache. More... | |
int | _sion_cache_init (_sion_filedesc *sion_filedesc) |
Allocate and initalize the cache. More... | |
int | _sion_cache_destroy (_sion_filedesc *sion_filedesc) |
Deallocate the cache. More... | |
int | _sion_cache_create_linux (_sion_filedesc *sion_filedesc) |
Allocate cache for linux. More... | |
int | _sion_cache_load_linux (_sion_filedesc *sion_filedesc) |
Load an already allocated cache for linux. More... | |
int | _sion_cache_destroy_linux (_sion_filedesc *sion_filedesc) |
Deallocate cache for linux. More... | |
This functions control and manage a memory based cache for sion files. Depending on a set of environment variables the cache will work as write-through or as write-back cache. On Unix systems a POSIX shared memory segment will be used, on Blue Gene/P it is persistent memory.
A cache of n MB will store the last n MB of data per task in the cache. If the cache memory is filled, the full cache will be written to disk and the cache will be exhausted.
Definition in file sion_cache.c.
int _sion_cache_check_env | ( | _sion_filedesc * | sion_filedesc | ) |
Check if environment variables are set to use cache.
*sion_filedesc | sion file description struct (_sion_filedesc) |
Definition at line 57 of file sion_cache.c.
int _sion_cache_create_linux | ( | _sion_filedesc * | sion_filedesc | ) |
Allocate cache for linux.
*sion_filedesc | sion file description struct (_sion_filedesc) |
Definition at line 132 of file sion_cache.c.
int _sion_cache_destroy | ( | _sion_filedesc * | sion_filedesc | ) |
Deallocate the cache.
*sion_filedesc | sion file description struct (_sion_filedesc) |
Definition at line 111 of file sion_cache.c.
int _sion_cache_destroy_linux | ( | _sion_filedesc * | sion_filedesc | ) |
Deallocate cache for linux.
*sion_filedesc | sion file description struct (_sion_filedesc) |
Definition at line 223 of file sion_cache.c.
int _sion_cache_init | ( | _sion_filedesc * | sion_filedesc | ) |
Allocate and initalize the cache.
*sion_filedesc | sion file description struct (_sion_filedesc) |
Definition at line 79 of file sion_cache.c.
int _sion_cache_load_linux | ( | _sion_filedesc * | sion_filedesc | ) |
Load an already allocated cache for linux.
*sion_filedesc | sion file description struct (_sion_filedesc) |
Definition at line 177 of file sion_cache.c.