summaryrefslogtreecommitdiffstats
path: root/src/H5ACpkg.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-07-19 13:43:22 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-07-19 13:43:22 (GMT)
commita37131ef04d9b2aab2ee7adeceea43dbd1670ba2 (patch)
tree1417f4a2bea20396809f12d597920d7586bb4eea /src/H5ACpkg.h
parent1ff6aff53dacca3afaa96ad959c857693ea6f6d6 (diff)
downloadhdf5-a37131ef04d9b2aab2ee7adeceea43dbd1670ba2.zip
hdf5-a37131ef04d9b2aab2ee7adeceea43dbd1670ba2.tar.gz
hdf5-a37131ef04d9b2aab2ee7adeceea43dbd1670ba2.tar.bz2
[svn-r19097] Description:
Bring r19096 from trunk to 1.8 branch: Bring "round robin" metadata write strategy code from 'round_robin' branch to the trunk. 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/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) 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-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode Mac OS X/32 10.6.3 (amazon) in debug mode Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src/H5ACpkg.h')
-rw-r--r--src/H5ACpkg.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/src/H5ACpkg.h b/src/H5ACpkg.h
index d5346f5..3060a70 100644
--- a/src/H5ACpkg.h
+++ b/src/H5ACpkg.h
@@ -46,6 +46,17 @@
#define H5AC_DEBUG_DIRTY_BYTES_CREATION 0
+#ifdef H5_HAVE_PARALLEL
+
+/* the following #defined are used to specify the operation required
+ * at a sync point.
+ */
+
+#define H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN 0
+#define H5AC_SYNC_POINT_OP__FLUSH_CACHE 1
+
+#endif /* H5_HAVE_PARALLEL */
+
/*-------------------------------------------------------------------------
* It is a bit difficult to set ranges of allowable values on the
* dirty_bytes_threshold field of H5AC_aux_t. The following are
@@ -59,6 +70,9 @@
#define H5AC__MAX_DIRTY_BYTES_THRESHOLD (int32_t) \
(H5C__MAX_MAX_CACHE_SIZE / 4)
+#define H5AC__DEFAULT_METADATA_WRITE_STRATEGY \
+ H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED
+
/****************************************************************************
*
* structure H5AC_aux_t
@@ -162,6 +176,12 @@
* broadcast. This field is reset to zero after each such
* broadcast.
*
+ * metadata_write_strategy: Integer code indicating how we will be
+ * writing the metadata. In the first incarnation of
+ * this code, all writes were done from process 0. This
+ * field exists to facilitate experiments with other
+ * strategies.
+ *
* dirty_bytes_propagations: This field only exists when the
* H5AC_DEBUG_DIRTY_BYTES_CREATION #define is TRUE.
*
@@ -211,6 +231,19 @@
* been created via move operations since the last time
* the cleaned list was propagated.
*
+ * Things have changed a bit since the following four fields were defined.
+ * If metadata_write_strategy is H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY,
+ * all comments hold as before -- with the caviate that pending further
+ * coding, the process 0 metadata cache is forbidden to flush entries outside
+ * of a sync point.
+ *
+ * However, for different metadata write strategies, these fields are used
+ * only to maintain the correct dirty byte count on process zero -- and in
+ * most if not all cases, this is redundant, as process zero will be barred
+ * from flushing entries outside of a sync point.
+ *
+ * JRM -- 3/16/10
+ *
* d_slist_ptr: Pointer to an instance of H5SL_t used to maintain a list
* of entries that have been dirtied since the last time they
* were listed in a clean entries broadcast. This list is
@@ -259,6 +292,17 @@
* contain the value 0 on all processes other than process 0.
* It exists primarily for sanity checking.
*
+ * The following two fields are used only when metadata_write_strategy
+ * is H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED.
+ *
+ * candidate_slist_ptr: Pointer to an instance of H5SL_t used by process 0
+ * to construct a list of entries to be flushed at this sync
+ * point. This list is then broadcast to the other processes,
+ * which then either flush or mark clean all entries on it.
+ *
+ * candidate_slist_len: Integer field containing the number of entries on the
+ * candidate list. It exists primarily for sanity checking.
+ *
* write_done: In the parallel test bed, it is necessary to ensure that
* all writes to the server process from cache 0 complete
* before it enters the barrier call with the other caches.
@@ -271,6 +315,19 @@
* This field must be set to NULL when the callback is not
* needed.
*
+ * Note: This field has been extended for use by all processes
+ * with the addition of support for the distributed
+ * metadata write strategy.
+ * JRM -- 5/9/10
+ *
+ * sync_point_done: In the parallel test bed, it is necessary to verify
+ * that the expected writes, and only the expected writes,
+ * have taken place at the end of each sync point.
+ *
+ * The sync_point_done callback allows t_cache to perform
+ * this verification. The field is set to NULL when the
+ * callback is not needed.
+ *
****************************************************************************/
#ifdef H5_HAVE_PARALLEL
@@ -293,6 +350,8 @@ typedef struct H5AC_aux_t
int32_t dirty_bytes;
+ int32_t metadata_write_strategy;
+
#if H5AC_DEBUG_DIRTY_BYTES_CREATION
int32_t dirty_bytes_propagations;
@@ -316,8 +375,15 @@ typedef struct H5AC_aux_t
int32_t c_slist_len;
+ H5SL_t * candidate_slist_ptr;
+
+ int32_t candidate_slist_len;
+
void (* write_done)(void);
+ void (* sync_point_done)(int num_writes,
+ haddr_t * written_entries_tbl);
+
} H5AC_aux_t; /* struct H5AC_aux_t */
#endif /* H5_HAVE_PARALLEL */