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

Attribute Cache (acache)

The acache implements a simple client side cache for PVFS2 attibutes as well as logical file sizes. More...

Files

file  acache.c
file  acache.h

Defines

#define PINT_acache_options   PINT_tcache_options

Functions

void PINT_acache_enable_perf_counter (struct PINT_perf_counter *pc, struct PINT_perf_counter *static_pc)
int PINT_acache_initialize (void)
void PINT_acache_finalize (void)
int PINT_acache_get_info (enum PINT_acache_options option, unsigned int *arg)
int PINT_acache_set_info (enum PINT_acache_options option, unsigned int arg)
int PINT_acache_get_cached_entry (PVFS_object_ref refn, PVFS_object_attr *attr, int *attr_status, PVFS_size *size, int *size_status)
int PINT_acache_update (PVFS_object_ref refn, PVFS_object_attr *attr, PVFS_size *size)
void PINT_acache_invalidate (PVFS_object_ref refn)
void PINT_acache_invalidate_size (PVFS_object_ref refn)

Variables

PINT_perf_key acache_keys []
PINT_perf_key acache_keys []

Detailed Description

The acache implements a simple client side cache for PVFS2 attibutes as well as logical file sizes.

A timeout is associated with each attribute structure to dictate when it will expire, and the attribute mask is used to determine which fields in the attribute structure are valid at a given time. The acache is built on top of the generic tcache caching component.

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 acache: Operations that may insert items into the cache: Operations that may invalidate items in the cache:

Define Documentation

#define PINT_acache_options   PINT_tcache_options
 

See also:
PINT_tcache_options


Function Documentation

void PINT_acache_enable_perf_counter struct PINT_perf_counter pc,
struct PINT_perf_counter static_pc
 

Enables perf counter instrumentation of the acache.

Parameters:
pc  counter for non static fields
static_pc  counter for static fields

void PINT_acache_finalize void   ) 
 

Finalizes and destroys the acache, frees all cached entries.

Here is the call graph for this function:

int PINT_acache_get_cached_entry PVFS_object_ref  refn,
PVFS_object_attr *  attr,
int *  attr_status,
PVFS_size *  size,
int *  size_status
 

Retrieves a _copy_ of a cached attributes structure.

Also retrieves the logical file size (if the object in question is a file) and reports the status of both the attributes and size to indicate if they are valid or not

Returns:
0 on success, -PVFS_error on failure
Parameters:
refn  PVFS2 object to look up
attr  attributes of the object
attr_status  indicates if the attributes are expired or not
size  logical size of the object (only valid for files)
size_status  indicates if the size has expired or not

Here is the call graph for this function:

int PINT_acache_get_info enum PINT_acache_options  option,
unsigned int *  arg
 

Retrieves parameters from the acache.

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_acache_initialize void   ) 
 

Initializes the acache.

Returns:
pointer to tcache on success, NULL on failure

Here is the call graph for this function:

void PINT_acache_invalidate PVFS_object_ref  refn  ) 
 

Invalidates a cache entry (if present).

Here is the call graph for this function:

void PINT_acache_invalidate_size PVFS_object_ref  refn  ) 
 

Invalidates only the logical size assocated with an entry (if present).

Here is the call graph for this function:

int PINT_acache_set_info enum PINT_acache_options  option,
unsigned int  arg
 

Sets optional parameters in the acache.

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_acache_update PVFS_object_ref  refn,
PVFS_object_attr *  attr,
PVFS_size *  size
 

Adds a set of attributes to the cache, or updates them if they are already present.

The given attributes are _copied_ into the cache. Size parameter will not be updated if it is NULL.

Note:
NOTE: All previous attribute and size information for the object will be discarded, even if there is still time remaining before it expires and the new attributes and/or size contain less information.
Returns:
0 on success, -PVFS_error on failure
Parameters:
refn  object to update
attr  attributes to copy into cache
size  logical file size (NULL if not available)

Here is the call graph for this function:


Variable Documentation

struct PINT_perf_key acache_keys[]
 

acache performance counter keys

struct PINT_perf_key acache_keys[]
 

Initial value:

 
{
   {"ACACHE_NUM_ENTRIES", PERF_ACACHE_NUM_ENTRIES, PINT_PERF_PRESERVE},
   {"ACACHE_SOFT_LIMIT", PERF_ACACHE_SOFT_LIMIT, PINT_PERF_PRESERVE},
   {"ACACHE_HARD_LIMIT", PERF_ACACHE_HARD_LIMIT, PINT_PERF_PRESERVE},
   {"ACACHE_HITS", PERF_ACACHE_HITS, 0},
   {"ACACHE_MISSES", PERF_ACACHE_MISSES, 0},
   {"ACACHE_UPDATES", PERF_ACACHE_UPDATES, 0},
   {"ACACHE_PURGES", PERF_ACACHE_PURGES, 0},
   {"ACACHE_REPLACEMENTS", PERF_ACACHE_REPLACEMENTS, 0},
   {"ACACHE_DELETIONS", PERF_ACACHE_DELETIONS, 0},
   {"ACACHE_ENABLED", PERF_ACACHE_ENABLED, PINT_PERF_PRESERVE},
   {NULL, 0, 0},
}
acache performance counter keys


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