summaryrefslogtreecommitdiffstats
path: root/src/H5Fint.c
diff options
context:
space:
mode:
authormainzer <mainzer#hdfgroup.org>2020-08-05 20:39:49 (GMT)
committermainzer <mainzer#hdfgroup.org>2020-08-05 20:39:49 (GMT)
commit33f35183cbfdde70ee8f803acb5b735ad4dfe086 (patch)
treee18d05c2c6b34f4baba1d4b28250dc4cf9d51171 /src/H5Fint.c
parent50f404c887118577034c6412aeaaa1f6db2fe475 (diff)
downloadhdf5-33f35183cbfdde70ee8f803acb5b735ad4dfe086.zip
hdf5-33f35183cbfdde70ee8f803acb5b735ad4dfe086.tar.gz
hdf5-33f35183cbfdde70ee8f803acb5b735ad4dfe086.tar.bz2
When flushing, the metadata cache attempts to flush entries in increasing
address order. To facilitate this, the metadata cache needs a list of of dirty entries in increasing address order. This is implemented via a skip list of all dirty entries in the cache. To date this skip list has been maintained at all times. However, profiling indicates that we can avoid significant overhead by constructing the skip list of dirty entries just before a flush, taking it down afterwareds, and not maintaining it during normal operation. This commit implements this optimization for both serial and parallel. Tested serial and parallel, debug and production on charis and jelly.
Diffstat (limited to 'src/H5Fint.c')
-rw-r--r--src/H5Fint.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/H5Fint.c b/src/H5Fint.c
index 0bda894..4a4b8b6 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -1914,6 +1914,11 @@ H5F__flush_phase2(H5F_t *f, hbool_t closing)
/* Sanity check arguments */
HDassert(f);
+ /* Inform the metadata cache that we are about to flush */
+ if(H5AC_prep_for_file_flush(f) < 0)
+ /* Push error, but keep going*/
+ HDONE_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "prep for MDC flush failed")
+
/* Flush the entire metadata cache */
if(H5AC_flush(f) < 0)
/* Push error, but keep going*/
@@ -1946,6 +1951,11 @@ H5F__flush_phase2(H5F_t *f, hbool_t closing)
H5CX_set_mpi_file_flushing(FALSE);
#endif /* H5_HAVE_PARALLEL */
+ /* Inform the metadata cache that we are done with the flush */
+ if(H5AC_secure_from_file_flush(f) < 0)
+ /* Push error, but keep going*/
+ HDONE_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "secure from MDC flush failed")
+
/* Flush out the metadata accumulator */
if(H5F__accum_flush(f->shared) < 0)
/* Push error, but keep going*/