summaryrefslogtreecommitdiffstats
path: root/src/H5Cprivate.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-03-26 18:16:54 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-03-26 18:16:54 (GMT)
commitbbe430429dd0f922578a566a6873160ac3dfa518 (patch)
treee72ffb1860a479024419dfaa28138d00767add64 /src/H5Cprivate.h
parenteb070568b0b396797eb66a894c596c2fba7a0c9f (diff)
downloadhdf5-bbe430429dd0f922578a566a6873160ac3dfa518.zip
hdf5-bbe430429dd0f922578a566a6873160ac3dfa518.tar.gz
hdf5-bbe430429dd0f922578a566a6873160ac3dfa518.tar.bz2
[svn-r16618] Description:
Modify metadata cache flush dependency feature to allow it to work with entries that are pinned through the cache API calls. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/Intel compilers w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.5.6 (amazon) in debug mode Mac OS X/32 10.5.6 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src/H5Cprivate.h')
-rw-r--r--src/H5Cprivate.h35
1 files changed, 34 insertions, 1 deletions
diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h
index 855c861..5d89313 100644
--- a/src/H5Cprivate.h
+++ b/src/H5Cprivate.h
@@ -378,6 +378,37 @@ typedef herr_t (*H5C_log_flush_func_t)(H5C_t * cache_ptr,
* 'dest' callback routine.
*
*
+ * Fields supporting the 'flush dependency' feature:
+ *
+ * Entries in the cache may have a 'flush dependency' on another entry in the
+ * cache. A flush dependency requires that all dirty child entries be flushed
+ * to the file before a dirty parent entry (of those child entries) can be
+ * flushed to the file. This can be used by cache clients to create data
+ * structures that allow Single-Writer/Multiple-Reader (SWMR) access for the
+ * data structure.
+ *
+ * The leaf child entry will have a "height" of 0, with any parent entries
+ * having a height of 1 greater than the maximum height of any of their child
+ * entries (flush dependencies are allowed to create asymmetric trees of
+ * relationships).
+ *
+ * flush_dep_parent: Pointer to the parent entry for an entry in a flush
+ * dependency relationship.
+ *
+ * child_flush_dep_height_rc: An array of reference counts for child entries,
+ * where the number of children of each height is tracked.
+ *
+ * flush_dep_height: The height of the entry, which is one greater than the
+ * maximum height of any of its child entries..
+ *
+ * pinned_from_client: Whether the entry was pinned by an explicit pin request
+ * from a cache client.
+ *
+ * pinned_from_cache: Whether the entry was pinned implicitly as a
+ * request of being a parent entry in a flush dependency
+ * relationship.
+ *
+ *
* Fields supporting the hash table:
*
* Fields in the cache are indexed by a more or less conventional hash table.
@@ -504,11 +535,13 @@ typedef struct H5C_cache_entry_t
hbool_t destroy_in_progress;
hbool_t free_file_space_on_destroy;
- /* fields supporting the 'flush dependency height': */
+ /* fields supporting the 'flush dependency' feature: */
struct H5C_cache_entry_t * flush_dep_parent;
uint64_t child_flush_dep_height_rc[H5C__NUM_FLUSH_DEP_HEIGHTS];
unsigned flush_dep_height;
+ hbool_t pinned_from_client;
+ hbool_t pinned_from_cache;
/* fields supporting the hash table: */