Main Page | Modules | Data Structures | File List | Data Fields | Globals

Name Cache (ncache)

The ncache implements a simple client side cache for PVFS2 files. More...

Files

file  ncache.c
file  ncache.h

Defines

#define PINT_ncache_options   PINT_tcache_options

Functions

void PINT_ncache_enable_perf_counter (struct PINT_perf_counter *pc)
int PINT_ncache_initialize (void)
void PINT_ncache_finalize (void)
int PINT_ncache_get_info (enum PINT_ncache_options option, unsigned int *arg)
int PINT_ncache_set_info (enum PINT_ncache_options option, unsigned int arg)
int PINT_ncache_get_cached_entry (const char *entry, PVFS_object_ref *entry_ref, const PVFS_object_ref *parent_ref)
int PINT_ncache_update (const char *entry, const PVFS_object_ref *entry_ref, const PVFS_object_ref *parent_ref)
void PINT_ncache_invalidate (const char *entry, const PVFS_object_ref *parent_ref)

Variables

PINT_perf_key ncache_keys []
PINT_perf_key ncache_keys []

Detailed Description

The ncache implements a simple client side cache for PVFS2 files.

A timeout is associated with each entry to dictate when it will expire. The ncache is built on top of the generic tcache caching component. The NCACHE component will cache the following:

The tcache implements a simple component for caching data structures that can be referenced by unique, opaque keys. A timeout is associated with each entry to dictate when it will expire. Specific caches such as the attribute or name cache may be built on top of this one.

Notes:

Operations that may retrieve items from ncache: Operations that may insert items into the cache: Operations that may DELETE items from the cache:

Define Documentation

#define PINT_ncache_options   PINT_tcache_options
 

See also:
PINT_tcache_options


Function Documentation

void PINT_ncache_enable_perf_counter struct PINT_perf_counter pc  ) 
 

Enables perf counter instrumentation of the ncache.

Parameters:
pc  perf counter instance to use

void PINT_ncache_finalize void   ) 
 

Finalizes and destroys the ncache, frees all cached entries.

Here is the call graph for this function:

int PINT_ncache_get_cached_entry const char *  entry,
PVFS_object_ref entry_ref,
const PVFS_object_ref parent_ref
 

Retrieves a _copy_ of a cached object reference, and reports the status to indicate if they are valid or not.

Returns:
0 on success, -PVFS_error on failure
Parameters:
entry  path of obect to look up
entry_ref  PVFS2 object looked up
parent_ref  Parent of PVFS2 object

Here is the call graph for this function:

int PINT_ncache_get_info enum PINT_ncache_options  option,
unsigned int *  arg
 

Retrieves parameters from the ncache.

See also:
PINT_tcache_options
Returns:
0 on success, -PVFS_error on failure
Parameters:
option  option to read
arg  output value

Here is the call graph for this function:

int PINT_ncache_initialize void   ) 
 

Initializes the ncache.

Returns:
pointer to tcache on success, NULL on failure

Here is the call graph for this function:

void PINT_ncache_invalidate const char *  entry,
const PVFS_object_ref parent_ref
 

Invalidates a cache entry (if present).

Parameters:
entry  path of obect
parent_ref  Parent of PVFS2 object

Here is the call graph for this function:

int PINT_ncache_set_info enum PINT_ncache_options  option,
unsigned int  arg
 

Sets optional parameters in the ncache.

See also:
PINT_tcache_options
Returns:
0 on success, -PVFS_error on failure
Parameters:
option  option to modify
arg  input value

Here is the call graph for this function:

int PINT_ncache_update const char *  entry,
const PVFS_object_ref entry_ref,
const PVFS_object_ref parent_ref
 

Adds a name to the cache, or updates it if already present.

The given name is _copied_ into the cache.

Note:
NOTE: All previous information for the object will be discarded, even if there is still time remaining before it expires.
Returns:
0 on success, -PVFS_error on failure
Parameters:
entry  entry to update
entry_ref  entry ref to update
parent_ref  parent ref to update

Here is the call graph for this function:


Variable Documentation

struct PINT_perf_key ncache_keys[]
 

ncache performance counter keys

struct PINT_perf_key ncache_keys[]
 

Initial value:

 
{
   {"NCACHE_NUM_ENTRIES", PERF_NCACHE_NUM_ENTRIES, PINT_PERF_PRESERVE},
   {"NCACHE_SOFT_LIMIT", PERF_NCACHE_SOFT_LIMIT, PINT_PERF_PRESERVE},
   {"NCACHE_HARD_LIMIT", PERF_NCACHE_HARD_LIMIT, PINT_PERF_PRESERVE},
   {"NCACHE_HITS", PERF_NCACHE_HITS, 0},
   {"NCACHE_MISSES", PERF_NCACHE_MISSES, 0},
   {"NCACHE_UPDATES", PERF_NCACHE_UPDATES, 0},
   {"NCACHE_PURGES", PERF_NCACHE_PURGES, 0},
   {"NCACHE_REPLACEMENTS", PERF_NCACHE_REPLACEMENTS, 0},
   {"NCACHE_DELETIONS", PERF_NCACHE_DELETIONS, 0},
   {"NCACHE_ENABLED", PERF_NCACHE_ENABLED, PINT_PERF_PRESERVE},
   {NULL, 0, 0},
}
ncache performance counter keys


Generated on Tue Feb 7 02:44:08 2012 for PVFS by doxygen 1.3.5