summaryrefslogtreecommitdiffstats
path: root/test/cache_tagging.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 /test/cache_tagging.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 'test/cache_tagging.c')
-rw-r--r--test/cache_tagging.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/test/cache_tagging.c b/test/cache_tagging.c
index cf0cd8d..499f23b 100644
--- a/test/cache_tagging.c
+++ b/test/cache_tagging.c
@@ -348,11 +348,20 @@ evict_entries(hid_t fid)
/* Mark all entries investigated */
mark_all_entries_investigated(fid);
+ /* setup the skip list prior to calling H5C_flush_cache() */
+ if ( H5C_set_slist_enabled(f->shared->cache, TRUE, FALSE) < 0 )
+ TEST_ERROR;
+
/* Evict all we can from the cache to examine full tag creation tree */
- /* This function will likely return failure since the root group
- * is still protected. Thus, don't check its return value. */
+ /* This function will likely return failure since the root group
+ * is still protected. Thus, don't check its return value.
+ */
H5C_flush_cache(f, H5C__FLUSH_INVALIDATE_FLAG);
+ /* shutdown the slist -- allow it to be non-empty */
+ if ( H5C_set_slist_enabled(f->shared->cache, FALSE, TRUE) < 0 )
+ TEST_ERROR;
+
return 0;
error: